Search found 12090 matches

by tokumaru
Fri Jun 11, 2021 4:22 am
Forum: NESemdev
Topic: Handling Illegal Opcodes
Replies: 10
Views: 517

Re: Handling Illegal Opcodes

Definitely not right in the sense that it's not what a real console would do, but It's a quick solution that will work for the vast majority of licensed games.
by tokumaru
Fri Jun 11, 2021 4:11 am
Forum: Newbie Help Center
Topic: Questions About DPCM and PCM
Replies: 14
Views: 764

Re: Questions About DPCM and PCM

I'm not an APU expert by any means, but you're waiting for the value read back from $4015 to have ALL bits cleared, while the only bit you're interested in is bit 4. It is possible that the other unrelated bits are getting in your way and the value never reads back as 0, causing your program to get ...
by tokumaru
Thu Jun 10, 2021 3:17 pm
Forum: Newbie Help Center
Topic: How to not hard code sprites
Replies: 3
Views: 219

Re: How to not hard code sprites

I posted an example metasprite subroutine recently: viewtopic.php?f=10&t=23011&p=272984#p272984
by tokumaru
Wed Jun 09, 2021 3:14 am
Forum: NESdev
Topic: Problem with palette discoloration when PPU is turned off during rendering.
Replies: 15
Views: 1112

Re: Problem with palette discoloration when PPU is turned off during rendering.

Ouch, another hardware quirk? Disabling rendering mid-frame really is something that comes with a lot of warnings!
by tokumaru
Sat Jun 05, 2021 1:13 pm
Forum: NES Graphics
Topic: 3D graphics: Linear Algebra in neslib.h
Replies: 12
Views: 1023

Re: 3D graphics: Linear Algebra in neslib.h

If you you're worried about the performance of 3D code on the NES at all, you'll probably have to write everything from scratch. If you do everything "by the book", using standard formulas, you can pretty much give up on any chance of getting a decent frame rate. To get anything remotely fluid on th...
by tokumaru
Mon May 31, 2021 10:50 am
Forum: Newbie Help Center
Topic: Creating a data structure.
Replies: 33
Views: 1661

Re: Creating a data structure.

Pokun wrote:
Mon May 31, 2021 9:05 am
I guess Asm6 just ignores the name of the label so you still refer to them with +/- even if you name them?
No, it doesn't ignore the name. You have to write the full name to reference these labels (e.g. bne +skip).
by tokumaru
Sun May 30, 2021 2:15 pm
Forum: Newbie Help Center
Topic: Creating a data structure.
Replies: 33
Views: 1661

Re: Creating a data structure.

I don't remember anymore, but it was probably something simple like this. If I'm not mistaken, I actually removed the automatic scope creation altogether and added a "scope" or "local" directive to manually control the start of new scopes. I ended up not sharing this because I figured most people wo...
by tokumaru
Sun May 30, 2021 12:06 pm
Forum: Newbie Help Center
Topic: Creating a data structure.
Replies: 33
Views: 1661

Re: Creating a data structure.

I remember modifying ASM6 to not start new scopes on +/- labels, and also adding a BANK property to labels (plus a directive to set the current bank number and an operator to retrieve that property), and that fixed almost all my gripes with that assembler. I hardly use ASM6 these days though...
by tokumaru
Sun May 30, 2021 11:41 am
Forum: Newbie Help Center
Topic: Creating a data structure.
Replies: 33
Views: 1661

Re: Creating a data structure.

Pokun wrote:
Sun May 30, 2021 11:24 am
I think local labels are fine in asm6 except that you can't mix them with nameless labels (+ and - labels) for some reason.
Exactly! And since + and - labels are way more useful, that renders local labels practically useless IMO.
by tokumaru
Sat May 29, 2021 7:54 pm
Forum: Newbie Help Center
Topic: Creating a data structure.
Replies: 33
Views: 1661

Re: Creating a data structure.

skipDebugX is a global label that starts a new local scope, so the code above that can't see the local label @nomoving defined below. That's completely expected and works exactly as documented. Local labels in ASM6 are pretty shitty though... If possible, use + and - labels instead. For example, +no...
by tokumaru
Tue May 25, 2021 7:30 pm
Forum: NESdev
Topic: (NOOB) good MMC chip explanations/tutorials?
Replies: 31
Views: 7787

Re: (NOOB) good MMC chip explanations/tutorials?

Also how does the 2006-2005-2006-2005 thing work? The PPU has a pair of registers it uses for scrolling: t (temporary VRAM address) and v (current VRAM address). These addresses have the following format: *yyyNNYY YYYXXXXX (15 bits) yyy: fine Y scroll; NN: name table; YYYYY: coarse Y scroll; XXXXX:...
by tokumaru
Tue May 25, 2021 2:11 am
Forum: NESdev
Topic: 4 way scroll - vert scroll problem
Replies: 3
Views: 727

Re: 4 way scroll - vert scroll problem

So I guess a have to use modulus % 240 to the vert scroll value? That's one way to do it, but I personally prefer to maintain two separate scroll values: an "ideal" one, that wraps around normally at 256, and a special one that wraps around at 240. You basically apply the same transformations to bo...
by tokumaru
Sat May 22, 2021 7:40 pm
Forum: Newbie Help Center
Topic: questions about asm6
Replies: 16
Views: 5682

Re: questions about asm6

Like I said in the other thread, only ROM sizes that are powers of 2 (16, 32, 64, 128, 256, 512...) are valid. So make sure that PRG_COUNT is always a power of 2, and that all the banks you have really add up to the size specified in the header (i.e. 1 = 16KB, 2 = 32KB, 4 = 64KB, 8 = 128KB, 16 = 256...
by tokumaru
Sat May 22, 2021 6:52 pm
Forum: Newbie Help Center
Topic: VRC7 Help (Really more about mappers that support multiple banks in general)
Replies: 22
Views: 5533

Re: VRC7 Help (Really more about mappers that support multiple banks in general)

Your ROM can't be 3x 16KB because that adds up to a chip size that doesn't exist. Valid PRG-ROM sizes are 16KB, 32KB, 64KB, 128KB, and so on. This means that if you want to extend your ROM past 32KB, you need to add *two* 16KB banks so the total size is 64KB. If later you want more than 64KB, then y...
by tokumaru
Sat May 22, 2021 6:43 pm
Forum: Newbie Help Center
Topic: questions about asm6
Replies: 16
Views: 5682

Re: Re:

puppydrum64 wrote:
Sat May 22, 2021 5:50 pm
if I try to add additional banks with the same .base and .pad instructions as my switchable banks I get a blank screen and the code is missing.
Can you show the relevant code?