It is currently Sun Oct 22, 2017 8:53 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Sat Dec 04, 2004 11:28 pm 
Offline

Joined: Tue Nov 23, 2004 9:35 pm
Posts: 615
Micro Machines non-racing screens do not display right on any emulator. (I own the game and know how it shoul be displayed. Even the mighty Nintendolator has graphics glitches (among the [b]very[/b] few games that it cannot display correctly.) Extra lines, shaking graphics, cut off letters. Did the Codemasters programmers decide to use some timing critical code in places where it is not really needed? Are the ROMs (both standalone and Alladin) bad ? Perhaps they are hitting "features/bugs" of the NES's PPU. But I would say that a truely accurate emulator should be able to display all the non-racing screens correctly.


Top
 Profile  
 
PostPosted: Sun Dec 05, 2004 1:11 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1389
Great Hierophant wrote:
Perhaps they are hitting "features/bugs" of the NES's PPU.

They read $2004 during rendering for some sort of timing checks. On a real PPU, this actually exposes the internal SPR-RAM accesses. No emulator is known to handle this properly.

_________________
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: Sun Dec 05, 2004 3:12 am 
Offline

Joined: Sat Nov 13, 2004 6:25 am
Posts: 96
Quote:
On a real PPU, this actually exposes the internal SPR-RAM accesses.

How would reads from $2004 affect the way the screen is rendered? Is $2003 register the same used for accesses to SPR-RAM on screen render?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 05, 2004 1:11 pm 
Offline

Joined: Mon Sep 27, 2004 11:51 pm
Posts: 101
I recall saying something about this on #nesdev. Basically what the game does is read data from SPR-RAM (bit $2004), then it performs a check on the value read and updates the screen based on such number. However, the $2004 read is performed during HBlank, which makes me think that it may be possible to read SPR-RAM data during HBlank. Here is a sample code that shows what I am talking about:

Code:
---------------------- PROCESSING *SCANLINE* #017 ---------------------
$fd76 A=$ff X=$08 Y=$00 SP=$f7 F= N       I   C  Cycle:246 pla
$fd77 A=$ff X=$08 Y=$00 SP=$f8 F= N       I   C  Cycle:234 pha
$fd78 A=$ff X=$08 Y=$00 SP=$f7 F= N       I   C  Cycle:225 pla
$fd79 A=$ff X=$08 Y=$00 SP=$f8 F= N       I   C  Cycle:213 pha
$fd7a A=$ff X=$08 Y=$00 SP=$f7 F= N       I   C  Cycle:204 pla
$fd7b A=$ff X=$08 Y=$00 SP=$f8 F= N       I   C  Cycle:192 pha
$fd7c A=$ff X=$08 Y=$00 SP=$f7 F= N       I   C  Cycle:183 pla
$fd7d A=$ff X=$08 Y=$00 SP=$f8 F= N       I   C  Cycle:171 pha
$fd7e A=$ff X=$08 Y=$00 SP=$f7 F= N       I   C  Cycle:162 pla
$fd7f A=$ff X=$08 Y=$00 SP=$f8 F= N       I   C  Cycle:150 pha
$fd80 A=$ff X=$08 Y=$00 SP=$f7 F= N       I   C  Cycle:141 pla
$fd81 A=$ff X=$08 Y=$00 SP=$f8 F= N       I   C  Cycle:129 pha
$fd82 A=$ff X=$08 Y=$00 SP=$f7 F= N       I   C  Cycle:120 pla
$fd83 A=$ff X=$08 Y=$00 SP=$f8 F= N       I   C  Cycle:108 pha
$fd84 A=$ff X=$08 Y=$00 SP=$f7 F= N       I   C  Cycle:099 pla
$fd85 A=$ff X=$08 Y=$00 SP=$f8 F= N       I   C  Cycle:087 pha
$fd86 A=$ff X=$08 Y=$00 SP=$f7 F= N       I   C  Cycle:078 pla
$fd87 A=$ff X=$08 Y=$00 SP=$f8 F= N       I   C  Cycle:066 pha
$fd88 A=$ff X=$08 Y=$00 SP=$f7 F= N       I   C  Cycle:057 pla
$fd89 A=$ff X=$08 Y=$00 SP=$f8 F= N       I   C  Cycle:045 pha
$fd8a A=$ff X=$08 Y=$00 SP=$f7 F= N       I   C  Cycle:036 pla
$fd8b A=$ff X=$08 Y=$00 SP=$f8 F= N       I   C  Cycle:024 pha
$fd8c A=$ff X=$08 Y=$00 SP=$f7 F= N       I   C  Cycle:015 pla
$fd8d A=$ff X=$08 Y=$00 SP=$f8 F= N       I   C  Cycle:003 pha
------------------------ PROCESSING *HBLANK* #017 -------------------------
$fd8e A=$ff X=$08 Y=$00 SP=$f7 F= N       I   C  Cycle:003 pla
$fd8f A=$ff X=$08 Y=$00 SP=$f8 F= N       I   C  Cycle:072 nop
$fd90 A=$ff X=$08 Y=$00 SP=$f8 F= N       I   C  Cycle:066 nop
$fd91 A=$ff X=$08 Y=$00 SP=$f8 F= N       I   C  Cycle:060 dex
$fd92 A=$ff X=$07 Y=$00 SP=$f8 F=         I   C  Cycle:054 bne $fd6e
$fd6e A=$ff X=$07 Y=$00 SP=$f8 F=         I   C  Cycle:045 bit $2004
$fd71 A=$ff X=$07 Y=$00 SP=$f8 F= N V     I   C  Cycle:033 bmi $fd73


Eventually the N flags is reset and the game moves on to something else.

_________________
http://hydesprojects.cjb.net/


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 05, 2004 7:10 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
Some of you might disagree... but I got a few good results by enabling sprite address++ on reads ;)

_________________
Zepper
RockNES developer


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 05, 2004 8:49 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1389
Fx3 wrote:
Some of you might disagree... but I got a few good results by enabling sprite address++ on reads ;)

Guess what? It's been thoroughly tested that reading $2004 does NOT increment the SPR-RAM address ($2003), so that's not the way to do 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: Mon Dec 06, 2004 1:50 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
I know that.
Let me label it as "a hack" ;)

_________________
Zepper
RockNES developer


Top
 Profile  
 
 Post subject: :)
PostPosted: Mon Dec 06, 2004 4:49 pm 
Offline
User avatar

Joined: Wed Nov 17, 2004 12:34 pm
Posts: 41
Quietust matches his facepic well.

Can someone set up a rig showing the values of $2004 during rendering of a particular scene? (in h-blank). Won't the output just be some "random" data from the sprites about to be rendered on the next scanline?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 20, 2004 4:56 am 
Offline

Joined: Mon Dec 20, 2004 4:51 am
Posts: 6
yeah these micro machienes games are difficult, the oddest things are discovered trying to pick through wack code, it's amazing some of this stuff worked in the first place.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 01, 2005 2:09 pm 
Offline

Joined: Mon Sep 27, 2004 11:51 pm
Posts: 101
Could it be that reading from $2004 while rendering is on would take a few extra cycles?

_________________
http://hydesprojects.cjb.net/


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 01, 2005 9:24 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19115
Location: NE Indiana, USA (NTSC)
You're thinking of the GBA. The NES CPU doesn't have "wait states" in the same way as the GBA CPU.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google Adsense [Bot] and 4 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