Search found 311 matches

by Petruza
Mon Sep 11, 2017 6:00 am
Forum: NESemdev
Topic: How to tell if CNROM has 16kB or 32kB PRG? what's CL & SL?
Replies: 2
Views: 3078

Re: How to tell if CNROM has 16kB or 32kB PRG? what's CL & S

Oh right, so even for carts that switch whole 32kB PRG banks the iNES header will count them in units of 16kB, right?
Thanks!
by Petruza
Sun Sep 10, 2017 4:34 pm
Forum: NESemdev
Topic: How to tell if CNROM has 16kB or 32kB PRG? what's CL & SL?
Replies: 2
Views: 3078

How to tell if CNROM has 16kB or 32kB PRG? what's CL & SL?

Looking at the Wiki https://wiki.nesdev.com/w/index.php/CNROM , I see that CNROM can have 16kB or 32kB PRG. I guess the way to tell which is described here: 16 KB PRG ROM : 'SL' connected, 'CL' disconnected. 32 KB PRG ROM : 'SL' disconnected, 'CL' connected. What are SL and CL? are those in the iNES...
by Petruza
Mon Sep 04, 2017 8:20 am
Forum: NESemdev
Topic: Advices on implementing mixed switchable and fixed PRG banks
Replies: 6
Views: 3245

Re: Advices on implementing mixed switchable and fixed PRG b

FCEUX uses an array of function pointers and calls the correct one for each memory access. Using memcpy will produce subtle bugs later on, e.g. when you get to MMC5. Imo, the simplest option (in the long run), is #1 - an array of pointers (e.g what lidnariq suggested) [...] Oh right! my emulator ac...
by Petruza
Sun Sep 03, 2017 9:53 am
Forum: NESemdev
Topic: Advices on implementing mixed switchable and fixed PRG banks
Replies: 6
Views: 3245

Advices on implementing mixed switchable and fixed PRG banks

Hi, my emulator is currently only supporting mapper 0, so the PRG-ROM is just a 32 kB chunk that gets loaded at ROM load and that's it. So mappers that switch entire 32 kB PRG banks are trivial, but for mapper 2-UNROM, for example, that uses one switchable 16 kB bank and another one fixed, I've thou...
by Petruza
Mon May 09, 2016 7:34 am
Forum: NESemdev
Topic: Super Mario Bros title screen
Replies: 9
Views: 7343

Re: Super Mario Bros title screen

SMB having to read CHR-ROM to display the title screen is actually a well-known issue of the game(see tokumaru and 3gengames' replies). It's because they ran out of space in the PRG area so part of the name table data of the title logo was stored in the CHR area. Yes, I just read it on the wiki art...
by Petruza
Sun May 08, 2016 2:35 pm
Forum: NESemdev
Topic: Super Mario Bros title screen
Replies: 9
Views: 7343

Re: Super Mario Bros title screen

I had the same problem with the title screen and the green mushroom, but the causes were totally different. Actually I hadn't implemented reading the CHR memory, because I assumed hardly any (CHR-ROM) game would do that. I haven't implemented CHR-RAM yet. So SMB reads the CHR-ROM for some reason I w...
by Petruza
Wed Jul 22, 2015 7:40 am
Forum: NESemdev
Topic: Early PPU dev: Background tile wrongly displayed
Replies: 5
Views: 2376

Re: Early PPU dev: Background tile wrongly displayed

Oh right, every scanline, ok.
by Petruza
Tue Jul 21, 2015 12:34 pm
Forum: NESemdev
Topic: Early PPU dev: Background tile wrongly displayed
Replies: 5
Views: 2376

Re: Early PPU dev: Background tile suddenly wrongly diplayed

Fumarumota wrote:Substraction of odd frames' last cycle when render is enabled was done wrong
That's strange, in the first versions of my PPU the odd cycle was simply ignored and nothing like this happened.
by Petruza
Fri Jun 26, 2015 2:17 pm
Forum: NESemdev
Topic: Expansion ROM what is it? ($4020..$5FFF)
Replies: 9
Views: 3552

Re: Expansion ROM what is it? ($4020..$5FFF)

Oh, that link explains it better!

By the way, I'm only testing mapper 0 games, and Brush Roller tries to write a 0 to $4800, is this right?
Many other games do work, and the CPU passed the Kevtris test so I'm pretty sure it does not mess addresses up.
by Petruza
Fri Jun 26, 2015 5:55 am
Forum: NESemdev
Topic: Expansion ROM what is it? ($4020..$5FFF)
Replies: 9
Views: 3552

Re: Expansion ROM what is it? ($4020..$5FFF)

Where have you seen this terminology? In two different docs both named NES documentation by Patrick Diskin and Jeremy Chadwick This might help: http://wiki.nesdev.com/w/index.php/CPU_memory_map Yes I had seen that, but it just labels $4020..$FFFF as Cartridge space: PRG ROM, PRG RAM, and mapper reg...
by Petruza
Thu Jun 25, 2015 7:08 pm
Forum: NESemdev
Topic: Expansion ROM what is it? ($4020..$5FFF)
Replies: 9
Views: 3552

Expansion ROM what is it? ($4020..$5FFF)

I've seen that the memory region $4020..$5FFF is labeled as Expansion ROM. But haven't seen any description of what expansion ROM is. Searching for "expansion" won't yield significant results in the wiki or in this forum. (other than referring to expansion audio or expansion port) The iNES header do...
by Petruza
Mon Jun 22, 2015 9:25 am
Forum: NESemdev
Topic: NROM ROM images with more than 2 PRG ROM or 1 CHR ROM
Replies: 2
Views: 1453

Re: NROM ROM images with more than 2 PRG ROM or 1 CHR ROM

Oh yes, you're right. Upon closer inspection, all these games are the ones known as sachen
Their headers report having mapper 0, 7 PRG ROMs and no CHR ROM.
Thanks!
by Petruza
Sun Jun 21, 2015 3:51 pm
Forum: NESemdev
Topic: NROM ROM images with more than 2 PRG ROM or 1 CHR ROM
Replies: 2
Views: 1453

NROM ROM images with more than 2 PRG ROM or 1 CHR ROM

The wiki says that NROM (Mapper 0) cartridges have 1 or 2 16KB PRG ROMs and 1 8KB CHR ROM.
But by watching into the iNES header of my collection of NES ROMs, I see that many mapper 0 ROMs actually have up to 7 of each.

Is this right?
is there some bank switching going on for mapper 0?
if so, how?
by Petruza
Tue May 26, 2015 6:45 pm
Forum: NESemdev
Topic: Do 2002.7 = 1 and NMI occur at the same time?
Replies: 7
Views: 3271

Re: Do 2002.7 = 1 and NMI occur at the same time?

This is what early homebrew programs did, before we found out about this issue. In order to reliably detect VBlank, you have to use the NMI. Oh ok, so they set some flag in RAM from the NMI subroutine and then check for that instead of 2002.7? because the main game loop has to know where to stop an...
by Petruza
Mon May 25, 2015 10:09 am
Forum: NESemdev
Topic: Do 2002.7 = 1 and NMI occur at the same time?
Replies: 7
Views: 3271

Re: Do 2002.7 = 1 and NMI occur at the same time?

Oh, so this might happen very frequently, as the main game loop usually enters a loop { LDA $2002; BPL } to wait for the next frame, right?
PS: Do you have an emulator written in other than Assembler?