Search found 12094 matches

by tokumaru
Fri Jun 18, 2021 6:18 pm
Forum: NES Hardware and Flash Equipment
Topic: Flash Cart Losing power
Replies: 2
Views: 123

Re: Flash Cart Losing power

Just to get something out of the way: is this a real Everdrive bought from official sources or is it a pirate clone?
by tokumaru
Thu Jun 17, 2021 4:07 am
Forum: NESdev
Topic: How do some games change vertical scroll at IRQ?
Replies: 4
Views: 324

Re: How do some games change vertical scroll at IRQ?

The "normal" way of setting the vertical scroll (i.e. via $2000 and $2005) does not work mid-frame. Using $2006 you can partially modify the vertical scroll mid-frame (the fine Y scroll can't be > 3). Using combined $2005 and $2006 writes you can set the scroll to whatever you want.
by tokumaru
Sat Jun 12, 2021 9:05 pm
Forum: Newbie Help Center
Topic: Questions About DPCM and PCM
Replies: 21
Views: 1719

Re: Questions About DPCM and PCM

Exactly what I suspected - your NMI handler is trashing the CPU registers. Look at it like this: the code that plays the samples takes several frames to complete, meaning that when NMIs are on, several will fire while that playback code is running. The last version of the code that polled $4015 reli...
by tokumaru
Sat Jun 12, 2021 6:25 pm
Forum: Newbie Help Center
Topic: Questions About DPCM and PCM
Replies: 21
Views: 1719

Re: Questions About DPCM and PCM

It looks like you're manually waiting for the samples to finish, which works in this particular case, but is not a general solution you can use every time. It *should* definitely be possible to programmatically wait for each sample to finish before starting the next one, so I think you should take s...
by tokumaru
Fri Jun 11, 2021 4:22 am
Forum: NESemdev
Topic: Handling Illegal Opcodes
Replies: 10
Views: 1198

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: 21
Views: 1719

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: 636

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: 1961

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: 1734

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: 2526

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: 2526

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: 2526

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: 2526

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: 2526

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: 9835

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:...