This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Non standard Rom?

Non standard Rom?
by on (#56771)
Ok...soo...
Friend of mine can write games with mapper 02(UxROM)and 71(Camerica) on EEPROM.But my Rom is simply not working...Also it's not working with Nestopia emulator.
The second thing is that i want make my rom bigger.
I'm using NESASM.
In header i have this options:

Code:
.inesprg 1
   .inesmap 2
   .inesmir 1
   .ineschr 1

Another friend said that i need to have 16 prg rom banks for normal UxROM game,and that there's no chr for uxROM.(chr files is loaded to $2007)

So i changed header to this:
Code:
.inesprg 16
   .inesmap 2
   .inesmir 1
   .ineschr 0

But here's the problem:If I give more than 1 prg bank then rom is not working at all... :cry:

Can someone help me,pretty please...

by on (#56773)
First make sure all your vectors (nmi, reset, and irq) point somewhere in the last bank. Otherwise, the NES doesn't know which bank to switch in at power-on to find your startup code.

by on (#56780)
I guess it must be related to the prototype you shown in the music thread.

Since you want to use VRC music, you have to take this into consideration:
- You need to change the mapper for VCR-6 one in your code
- If you make your game on a real cart (not with powerPak), only 3 japanese carts support this mapper: Akumajou densetsu, Madara, Esper Dream 2. Those carts don't use the same port for music too.
- The music will only run on a famicom unless you modify your nes and adapter to make it work

If you still go that way then the first thing to do before your game goes too far in development will be to find the cause of the bugs. Your game doesn't work well on the 2 most accurate emulators. On Nintendulator the title screen doesn't show at all and in Nestopia it freeze after the title screen.

There is good chances that the problems are related but trying to debug all in one shot would be hard. I would suggest to:

- Create test rom with title code only
- Convert mapper to VRC-6
- Start to test on both emulator to see where it fail

Good change it's something related to vblank. Once this work, you cart start to add more of the game code and see if it's still fail.

This is how I would approach it: convert to VRC-6, start to test title and increase the test code part by part. If you do thing your prg-bank code is fine then first fix the display bugs before converting to VRC-6. That could be an easier path actually.

edit:

About the 16 banks thing, Tepples is right, make sure the vectors are defined in the last bank.

by on (#56789)
NMI and reset is pointed to last bank,but i don;t know how to point IRQ thing,I searched nesdevwiki but I wasn't able to find it(or understand it).
And..hehe..Banshaku is right...i mean i forgot I can't use mapper 2 if I want VRC music,still expanding rom would be really useful.
My game is actually working under Nestopia,but you have to switch region to PAL.In NTSC it's freeze when you try to start actual game(menu is working fine...)
Quote:
only 3 japanese carts support this mapper

So,my friend can forget about burning eprom,As i wrote before-he can write mapper 2 i 71 only.

Quote:
Create test rom with title code only

It's working the same as whole game.
Quote:
Convert mapper to VRC-6

If I have to do something more than change number in header,then that's maybe a big problem :oops:

by on (#56791)
Denine wrote:
NMI and reset is pointed to last bank,but i don;t know how to point IRQ thing,I searched nesdevwiki but I wasn't able to find it(or understand it).


In the last bank, you just do this:

Code:
   .org $FFFA
   .dw vector_nmi
   .dw vector_reset
   .dw vector_irq


where vector_??? is the label where your nmi, reset or irq is located. If you don't use the IRQ then don't forget to disable it.

Denine wrote:
My game is actually working under Nestopia,but you have to switch region to PAL.In NTSC it's freeze when you try to start actual game(menu is working fine...)


One other issue here. If your target machine is PAL then you cannot use VRC6: this mapper only support NTSC.

Denine wrote:
Quote:
only 3 japanese carts support this mapper

So,my friend can forget about burning eprom,As i wrote before-he can write mapper 2 i 71 only.


Yes. You will only be able to use it in an emulator in this case.

Denine wrote:
Quote:
Create test rom with title code only

It's working the same as whole game.


The goal is to reduce the vector for where the game fail to work. The less code, the easier it will be to figure out the cause. Like mentioned above, your game doesn't work with Nintendulator. This is already a big issue. By reducing the code to only the title screen at first, this should help you figure out where the game fail since you only have the presentation screen to analyze. Once the title screen work, you add back the rest of the code and see if it still fail. Then you can start to debug the next part. Just see it as iterative debugging.


Denine wrote:
Quote:
Convert mapper to VRC-6

If I have to do something more than change number in header,then that's maybe a big problem :oops:


Unfortunately, yes you will have to do more. When you use a mapper like the VRC6, you will need to set the default state of the banks for the PRG ones and CHR one. Without that, only the fixed bank will be working right. If I can make that VRC6 sample for famitracker I will put the default bank initialization in it. That should be enough for the current state of your game. I started a little bit yesterday to convert it but in ca65 the sample was not working properly with the sample music I included. I don't know the cause yet (driver bug or my code). The volume of the song goes haywire after a few songs were switched. If you only use one song maybe this will not be an issue for now.

Edit:

I checked the rom and there seems to be some CHR-ROM appended to the end of the file. After tracing your code from the rom, you're trying to use mapper 2 when you don't seems to copy the data in CHR-RAM. What I did is changing the mapper number back to 0 and it's now started to work in Nintendulator. Menu was shown but it fail in the game if not in PAL mode. So it seems that Nestopia/FCEX try to load some CHR-ROM even thought the mapper say it's RAM.

As for the vector, only reset is defined at 8000, NMI and IRQ are not. My guess is your game does too much writing and it spill outside VBLANK but I could be wrong. If I remember well, PAL vblank is longer so this could be the reason that it works in PAL. You will have a lot of re-factoring to do in your game to make it work properly but this is all part of the learning experience. Don't give up ;)

by on (#56798)
Banshaku wrote:
One other issue here. If your target machine is PAL then you cannot use VRC6: this mapper only support NTSC.

How does VRC6 fail on PAL? Does it hijack the PPU like MMC5 does? Or does it just count scanlines too slowly?

Quote:
Yes. You will only be able to use it in an emulator in this case.

If you want to code for an emulator, code for the JVM ;-)

by on (#56800)
tepples wrote:
Banshaku wrote:
One other issue here. If your target machine is PAL then you cannot use VRC6: this mapper only support NTSC.

How does VRC6 fail on PAL? Does it hijack the PPU like MMC5 does? Or does it just count scanlines too slowly?

VRC6 "scanline" counter actually counts CPU cycles (and "divides" the result accordingly), so in scanline mode the counter wouldn't work correctly in PAL consoles. Other than that I think it should work fine.

by on (#56801)
thefox wrote:
VRC6 "scanline" counter actually counts CPU cycles (and "divides" the result accordingly), so in scanline mode the counter wouldn't work correctly in PAL consoles.

Which would mostly mean you'd need to multiply scanline counts by 15/16 on a PAL NES.

by on (#56804)
Yeah but even still it don't work because CV3 japanese does clear the counter at start of VBlank and add 20 to count value (when I run CV3 japanese on my powerpak, the status bar is always invisible/glitchy because all IRQs are fired during VBlank (I think). I haven't tried the other VRC games but I think it'd be the same crap.