It is currently Wed Oct 18, 2017 12:43 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed Sep 28, 2005 1:19 am 
Offline
User avatar

Joined: Tue Dec 21, 2004 8:35 pm
Posts: 600
Location: Argentina
After trying and trying i cant get battletoads to work in my emu, it hangs after the toad drop off the ship. I can hear the music but cant see any graph, the screen is blank.
I was wondering, wouldnt be single screen problem?
Im doing the following:

- when the games want to change the name table (0 or 1) i change my 4 pointers to point to the name talbe it wants (i have 0x400 * 4 external memory to handle name wich has nt data, and the appropiate functions and pointers to handle this memory area). I mean:

Code:
lpNT[0] = g_NTMEM + NT * 0x400;
lpNT[1] = g_NTMEM + NT * 0x400;
lpNT[2] = g_NTMEM + NT * 0x400;
lpNT[3] = g_NTMEM + NT * 0x400;


Where NT is what battletaods chooses via a write to 0x8000+ bit D4.

is that correct? if not can somebody explain me how real single screen works, cos what i understand by "all four cuadrants points to the same name table" is that what i wrote.

Thanks in advance.

_________________
ANes


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2005 4:01 am 
Offline

Joined: Thu Sep 15, 2005 9:23 am
Posts: 1194
Location: Behind you with a knife!
Exactly the same things happens on my emulator. When the toad drops before he gets to the ground the game just freezes. I think that it is to do with my sprite 0 hit detection as I am still getting an error in NEStress.

Maybe the game requires precise timing?

_________________
http://www.jamesturner.de/


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2005 6:44 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19093
Location: NE Indiana, USA (NTSC)
Battletoads requires unbelievably precise timing.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2005 6:50 am 
Offline

Joined: Thu Sep 15, 2005 9:23 am
Posts: 1194
Location: Behind you with a knife!
Since Battletoads is an AOROM (mapper 7) it is no wonder that it requires that much timing. Anes, is your emulator precise?

_________________
http://www.jamesturner.de/


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2005 10:30 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1389
WedNESday wrote:
Since Battletoads is an AOROM (mapper 7) it is no wonder that it requires that much timing. Anes, is your emulator precise?


Correlation is not the same as causation - there are plenty of Mapper 7 games which do not use insane timing. The actual reason behind the timing insanity is that the game was written by Rare/Coin-It.

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2005 12:57 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
Firstly, you *should* write a debugger. I'm sure the hang occurs because of sprite #0 hits - there's no background pattern due to ppu scroll reset timing. YES, my emulator has a similar problem - the game works, but it hangs "randomly" on Impact Crater stage *due to* sprite #0 (infinity loop).

Secondly, it might be a CPU bug. Don't trust NEStress.

_________________
Zepper
RockNES developer


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2005 1:30 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7226
Location: Chexbres, VD, Switzerland
Quietust wrote:
Correlation is not the same as causation - there are plenty of Mapper 7 games which do not use insane timing. The actual reason behind the timing insanity is that the game was written by Rare/Coin-It.

Scince Rare is basically a british software company, the game was originally written for the PAL format, so it's why it uploads to much tiles during VBLank, that is MUCH longer under a PAL screen, right ?
The PAL version of Battletoads probably doesn't use any tricky timings scince the VBlank is long enough to upload all the large array of graphics the game needs each frame, then the PPU can be constantly turned on, unlike the NTSC version.
Maybe if would be easier to first get the PAL version to work ?

About single screen miroring, I'm pretty much confused myself. Does that mirroring apply only while reading data, or for both read and write to the name table ? If it's both, then the nametable used for all 4 screens is determined by the single mirroring bit regardless of if the game write or reads it. In that case, it would probably change several times in a single VBlank while uploading status bar's tiles and playfield tiles.
Else, that would mean that write to PPU $2000-$23fff will write to nametable 1, and write to PPU $2400-$27fff will write to nametable 2. Then, when the screen is rendered, only the name table 1 or 2 is used in function of the 1-screen mirroring bit. That would make programmer's live easier, but it would need extra logic on the cartridge.
I don't know wich one of those is correct for a mapper 7 game. And what about a MMC1 game in single screen mode ?

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2005 1:47 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
When a game is in single-screen mirroring mode... one and ONLY one nametable is accessable... the other is completely out of range until "swapped in" by changing one-screen modes (or changing to a different mirroring mode).

So a game will need to flip between nametables by changing the mirroring mode when writing tiles to $2007.. unless it only needs to write to one nametable.

Or as Bregalad put it... one screen mirroring applies to both reading/writing.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2005 7:11 pm 
Offline

Joined: Fri Jul 29, 2005 3:40 pm
Posts: 345
Location: near chicago
Secondly, it might be a CPU bug. Don't trust NEStress.

what is wrong with nestress. i cant get that to work yet but was going to use it. i can get some demos to display ok, but alot of games just show a grey screen, few black...

matt


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 6:51 pm 
Offline
User avatar

Joined: Tue Dec 21, 2004 8:35 pm
Posts: 600
Location: Argentina
i did the following in my emulator and surpricely battletaodas passed the "sprite 0 hit" detection. What i did was to decrece the amount of scanlines in vblank (a thing that i dont understand cos its supposed that there are 20 scanlines of vblank).
i have a question when a rom has the type xxx (U).nes that is mean that si NTSC?
Where can i find a doc about this "nomenclature"?

_________________
ANes


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 8:19 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19093
Location: NE Indiana, USA (NTSC)
(J) = Japan, NTSC
(U) = North America, NTSC
(E) = Europe, PAL

Full list of GoodCodes


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 01, 2005 4:12 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
Well, you have a sprite #0 test, but it's nothing more than a sprite #0 test over a canonical background pattern. You should pay attention about a complex image - if the PPU scroll registers are reset in a wrong time, sprite #0 will fail out (no background pattern at that time).

_________________
Zepper
RockNES developer


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 01, 2005 7:35 am 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
Anes wrote:
What i did was to decrece the amount of scanlines in vblank (a thing that i dont understand cos its supposed that there are 20 scanlines of vblank).


That's what we call a "hack". In that you're doing something else wrong to cancel out the thing that's wrong... rather than fixing what is initially wrong. ;P

Er... so yeah... there ARE 20 scanlines of VBlank. This isn't the way to fix your problem... and will potentially break other games besides Battletoads.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 01, 2005 9:06 am 
Offline

Joined: Thu Sep 15, 2005 9:23 am
Posts: 1194
Location: Behind you with a knife!
Since a real NES can run all games using the same engine, a good emulator will do also. Leave the number of VBlank scanlines at 20 as this is correct. Making your emulator custom for certain games is what very old (and therefore crappy emulators used to do). Never introduce hacks for games, if it doesn't work then go back and find out why, as this is considered good programming practice.

_________________
http://www.jamesturner.de/


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 01, 2005 2:45 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
WedNESday, I imagine your enthusiasm for supporting the hardware exactly might wane when you find out all the intricate details. I've been testing the PPU's VBL flag recently and it's quite intricate (yes, the simple behavior of being set and cleared automatically).

I don't think there's anything wrong with an emulator running a limited set of games, as long as it's not being claimed to be a full NES emulator or that it emulates those games correctly. Some reasons for writing an emulator have little to do with general accuracy. There's an odd elitism I've seen here recently regarding the "correct" way to experiment with NES emulation. Obviously there is only one correct NES emulator (one that performs exactly as the hardware does), but that's not the only possible goal. This elitist attitude takes the fun out of writing an emulator and discussing it here.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group