nesdev.com
http://forums.nesdev.com/

Any-Yes: A Cycle-Accurate Java NES emulator
http://forums.nesdev.com/viewtopic.php?f=3&t=15629
Page 2 of 2

Author:  Dwedit [ Sat Mar 11, 2017 5:38 pm ]
Post subject:  Re: Any-Yes: A Cycle-Accurate Java NES emulator

Very few games banked CHR RAM around, but a few did. Lagrange Point did it. Rare's pinball games (TQROM) banked between CHR-RAM and CHR-ROM.

Author:  rainwarrior [ Sat Mar 11, 2017 5:39 pm ]
Post subject:  Re: Any-Yes: A Cycle-Accurate Java NES emulator

Some emulators kinda hard-code which mappers can have CHR-RAM or not, though I have no idea why. It's specified in the header, and CHR-RAM and CHR-ROM should be interchangeable, functionally. Boards with more than 8k of CHR-RAM are a problem, of course (without iNES 2 headers) so for those rare cases some sort of hard override was necessary, but otherwise "bankable" and "writeable" should be independent factors, I think?

Author:  lidnariq [ Sat Mar 11, 2017 5:45 pm ]
Post subject:  Re: Any-Yes: A Cycle-Accurate Java NES emulator

There's certainly no reason they should be correlated. Just for whatever reason they usually are. Given that all PCBs had to re-route things to connect PPU /WR to get CHR RAM to work anyway, I can only assume either laziness (it is easier to rip up just one trace and route one new trace) or never bothering to reevaluate it.

And certainly a very few games do make use of it.

(edit: I confused myself, nevermind)

Author:  YoukaiCountry [ Sat Mar 11, 2017 6:06 pm ]
Post subject:  Re: Any-Yes: A Cycle-Accurate Java NES emulator

The fact that bankable CHR-RAM is so rare is certainly the reason why writeable and bankable become correlated, at least in my case. Romancia and Lagrange Point were just these strange anomalies that I didn't quite know how to handle.
Writing the TQROM mapper forced me to do a total refactor of how CHR was handled, so this revelation that RAM should be able to be banked always was thankfully as easy as switching a boolean.
And now I know better.

Author:  Myask [ Sat Mar 11, 2017 7:02 pm ]
Post subject:  Re: Any-Yes: A Cycle-Accurate Java NES emulator

That is kinda the reason, I expect: in iNES, 0 in CHR-ROM field implies 8 KiB CHR-RAM, which is not a [usefully] bankable amount.
except MagicFloor's onechip but that's its own superspecial case anyway.

Author:  YoukaiCountry [ Sat Mar 11, 2017 7:15 pm ]
Post subject:  Re: Any-Yes: A Cycle-Accurate Java NES emulator

Yeah, there are a lot of different factors that make it seem (wrongfully) obvious that banking CHR-RAM just isn't done. Maybe some of the documentation needs to be updated making the whole issue a lot clearer.

Author:  tepples [ Sat Mar 11, 2017 8:03 pm ]
Post subject:  Re: Any-Yes: A Cycle-Accurate Java NES emulator

Myask wrote:
That is kinda the reason, I expect: in iNES, 0 in CHR-ROM field implies 8 KiB CHR-RAM, which is not a [usefully] bankable amount.

It might be useful with MMC3 if the game uses 4K for four 1K frames of a background CHR animation loop and the other 4K for sprite and background tiles, 3K of which are shared ($0000-$0BFF mirrors $1000-$1BFF).

  • C bit set in $8000
  • Reg 0 (PPU $1000-$17FF): 4 (CHR RAM $1000-$17FF)
  • Reg 1 (PPU $1800-$1FFF): 6 (CHR RAM $1800-$1FFF)
  • Reg 2 (PPU $0000-$03FF): 4 (CHR RAM $1000-$13FF)
  • Reg 3 (PPU $0400-$07FF): 5 (CHR RAM $1400-$17FF)
  • Reg 4 (PPU $0800-$0BFF): 6 (CHR RAM $1800-$1BFF)
  • Reg 5 (PPU $0C00-$0FFF): 0, 1, 2, or 3 (CHR RAM $0000, $0400, $0800, or $0C00)

With there being only five licensed MMC3 + 8K CHR RAM games, only three outside Japan, I doubt that any game actually uses this layout.

Author:  tokumaru [ Sat Mar 11, 2017 8:39 pm ]
Post subject:  Re: Any-Yes: A Cycle-Accurate Java NES emulator

It's true that most CHR-RAM​ games just used 8KB of it linearly, but the programmers were aware that it could be banked differently since the games do include code to initialize the CHR-RAM banks to the "default" setting.

Author:  YoukaiCountry [ Sun Mar 12, 2017 5:16 pm ]
Post subject:  Re: Any-Yes: A Cycle-Accurate Java NES emulator

Version 0.1.2 posted. This one adds 3 new mappers (18, 79, 185), fixes save state issues for mapper 16 and 19, grants more CPU threads to NTSC simulation, adds proper CHR-RAM banking, and has libGDX and lwjgl updates.

Download Any-Yes 0.1.2

Author:  YoukaiCountry [ Thu Mar 16, 2017 2:31 pm ]
Post subject:  Re: Any-Yes: A Cycle-Accurate Java NES emulator

Download Any-Yes 0.1.3

This one adds support for Lagrange Point, including sound! This is pretty exciting for me, as Lagrange Point is one of my favorite NES RPGs, and one of the most advanced games on the system.
Also in the sound department it adds some basic low and high pass filtering to the samples.

There was also a pretty major performance increase. I was generating a lot of Java garbage collection due to the way I was passing audio and video to my processing threads. I'm happy to report it is no longer an issue.

Besides those enhancements, this version comes with a lot of minor improvements including fixing a key mapping bug, some minor timing fixes, and better handling of audio and video thread cleanup.

Author:  YoukaiCountry [ Fri Mar 31, 2017 3:14 pm ]
Post subject:  Re: Any-Yes: A Cycle-Accurate Java NES emulator

Download Any-Yes 0.2.0

This version adds a much more conventional menu-based UI. It also allows command line rom launching (just pass the path to a rom as an argument).

There was another round of optimizations, and rendering in particular is significantly faster.

NMI triggering was rewritten, which fixes Bases Loaded II, and allowed me to remove a hack I had added to prevent Battletoads crashes.

Page 2 of 2 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/