Search found 3192 matches

by Zepper
Wed Jan 23, 2019 1:31 pm
Forum: NESemdev
Topic: OAM and sprites (wiki related)
Replies: 5
Views: 6758

Re: OAM and sprites (wiki related)

the copy of 8 bytes from OAM is triggered, then OAMADDR=0. Well, if OAMADDR is already zero, the copy does not happen. What's the difference between copying the eight bytes starting at 0 to 0 ... and not doing the copy? From a software point of view? if(0 != OAMADDR) memcpy(OAM,&OAM[OAMADDR&0xF8],8...
by Zepper
Wed Jan 23, 2019 11:51 am
Forum: NESemdev
Topic: OAM and sprites (wiki related)
Replies: 5
Views: 6758

Re: OAM and sprites (wiki related)

re: 3- It is the act of the hardware setting OAMADDR to 0 that causes the copy. This is a DRAM controller bug. Not clear yet. "The act of the hardware" how? If OAMADDR is non-zero (even less than 8?) and rendering is enabled ($2001), the copy of 8 bytes from OAM is triggered, then OAMADDR=0. Well, ...
by Zepper
Wed Jan 23, 2019 5:26 am
Forum: NESemdev
Topic: OAM and sprites (wiki related)
Replies: 5
Views: 6758

OAM and sprites (wiki related)

Quick recap. In my emulator, the game RC Pro AM II hangs on race start (black screen). Ages later, I've found the problem relying on copying and replacing the first 8 bytes of sprites before rendering starts. Well, for this game, if I push such copy to be triggered around PPU cycle 108, it works. Co...
by Zepper
Thu Jan 17, 2019 10:21 am
Forum: NESemdev
Topic: The long lost LoopyNES source code
Replies: 18
Views: 19289

Re: The long lost LoopyNES source code

WedNESday wrote:Surely being in possession of stolen source code is a crime?
It depends. The problem raises when you compile & create a program, and claims it's yours.
by Zepper
Thu Jan 17, 2019 10:14 am
Forum: NESemdev
Topic: the "right" timing for savestates?
Replies: 16
Views: 10917

Re: the "right" timing for savestates?

From what I've read, it does seem like a variable not being restored properly. Nope, it wasn't. Just the wrong timing - must be saved at the end of the current instruction. Period. I've never personally implemented savestates for WedNESday, so I've no experience with them. But shouldn't an emulator...
by Zepper
Tue Jan 15, 2019 5:36 am
Forum: NESemdev
Topic: the "right" timing for savestates?
Replies: 16
Views: 10917

Re: the "right" timing for savestates?

Sometimes timing can be sensitive that if you're off by a cycle or subcycle, if can ruin consistency or crash the game. I know that resetting Super Mario Bros 3 at the wrong time can cause it to crash. Good point. Are you sure the save time is exactly the same as the restore time? It doesn't matter...
by Zepper
Mon Jan 14, 2019 8:20 pm
Forum: NESemdev
Topic: the "right" timing for savestates?
Replies: 16
Views: 10917

Re: the "right" timing for savestates?

For what it's worth, I can't think of any reason why you would even want to allow pausing emulation mid-instruction, let alone creating a savestate. In my code, there's a function to poll keys right before the VBlank (line 240, cycle 0). Such function is called inside ppu_clock() which is called at...
by Zepper
Mon Jan 14, 2019 6:16 pm
Forum: NESemdev
Topic: the "right" timing for savestates?
Replies: 16
Views: 10917

Re: the "right" time for savestates?

None of you got the point, so I changed the topic slightly.
I'm asking if it's OK to save during mid-instruction, or if I should wait the current instruction to be completed, then poll keyboard (for saving/loading).
by Zepper
Mon Jan 14, 2019 1:48 pm
Forum: NESemdev
Topic: the "right" timing for savestates?
Replies: 16
Views: 10917

Re: the "right" time for savestates?

The problem is very specific. If I save a state when the game is loading the next level, then restore it, the bug appears.
by Zepper
Mon Jan 14, 2019 1:37 pm
Forum: NESemdev
Topic: the "right" timing for savestates?
Replies: 16
Views: 10917

the "right" timing for savestates?

I wonder... Eugene has found an obscure bug in my emulator regarding savestates during a screen transition. The game is Battletoads & Double Dragon. The bug occurs when a savestate is saved right during a screen transition (in this case, when you go from a sublevel to another, like 2-2 to 2-3, and t...
by Zepper
Tue Jan 08, 2019 6:23 am
Forum: NESemdev
Topic: APU behavior (Eliminator Boat Duel)
Replies: 22
Views: 17035

Re: APU behavior (Eliminator Boat Duel)

So, what's the correct setting for DMC powerup/reset? Address is set to $8000... or would it be $C000? In my emulator (current beta), I could "fix" the buzzing by doing the following: 1. There's a frequency table. static const int freq_table[0x10] = { 0x1AC, 0x17C, 0x154, 0x140, 0x11E, 0x0FE, 0x0E2,...
by Zepper
Mon Dec 31, 2018 12:56 pm
Forum: NESemdev
Topic: Mapper 153 questions
Replies: 4
Views: 6162

Re: Mapper 153 questions

If one bit selects a 256KiB outer PRG ROM bank, then the game(s) will have 512KiB at maximum of PRG ROM. Am I wrong? If this bit changes during the game, should the PRG inner pages be "updated" by using the last value written to? Plus, it says $C000-$FFFF is fixed to the last bank... of the current ...
by Zepper
Mon Dec 31, 2018 5:51 am
Forum: NESemdev
Topic: Mapper 153 questions
Replies: 4
Views: 6162

Mapper 153 questions

Info from the Wiki below. Outer PRG-ROM Bank Select ($8000-$8003 write) Mask: $800F 7 bit 0 ---- ---- xxxx xxxP | +-- Select 256 KiB outer PRG-ROM bank at CPU $8000-$FFFF The same value must be written to all four registers, or the outer PRG-ROM bank would be switched as the PPU is rendering. Becaus...
by Zepper
Thu Oct 11, 2018 2:29 pm
Forum: General Stuff
Topic: Why aren't more homebrew games sold as ROM only?
Replies: 52
Views: 24023

Re: Why aren't more homebrew games sold as ROM only?

Rahsennor wrote:Piracy is unavoidable. End of discussion.

If you are selling offline software, you are a charity case.
Right, but you can't copy your digital PS4 game copy into another console, for example.
by Zepper
Wed Sep 19, 2018 1:32 pm
Forum: NESemdev
Topic: Any clue on PPU emulation?
Replies: 36
Views: 32329

Re: Any on clue on PPU emulation?

No offense, but I'll say my opinion - do NOT do what he's saying. Reason - you are going to write an inaccurate software and placed down to the others. I experienced this back in 1998. Try to follow what's described in the PPU section (even if it looks crypt) and always have a goal of ACCURACY. Othe...