cpu speed

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

Well, about the VBlank flag, it might take conclusions about its effect on emulation - like if the ppu frame cannot start on VINT, OR in the scanline right before the scanline #0. I've read about starting at VINT, then starting at scanline -1... and that it doesn't even matter... ^_^;; This would require a verification on real hardware.

The NES has a lot of quirks that I'm impressed...
User avatar
blargg
Posts: 3715
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Post by blargg »

hap wrote:Kamen Rider Club (J) doesn't like that (locks up).
Either that or it doesn't like something else, but was content when this wasn't emulated correctly? Or maybe it's different on the Famicom.

One thing that would help with reverse-engineering efforts is data on what games actually do at power-up. In this case, if any of them try reading before the noted time (obviously Kamen Rider Club (J) does).

Also, the only way to really be sure an emulator is implementing things as specified is to write test ROMs for a given feature. Maybe I'll do that tonight for these power-up features.
User avatar
hap
Posts: 355
Joined: Thu Mar 24, 2005 3:17 pm
Contact:

Post by hap »

Kamen Rider Club (J):
- disables nmi, reads 0x2002.7 (set at boot)
- reads 0x2002.7 again (set at vblank)
- initialize (banking and such)
- while still in vblank:

Code: Select all

cpu prgbank3read ad: ef51(f51) data: a9
cpu prgbank3read ad: ef52(f52) data: c
a9 LDA Immediate PC:ef51 A:c X:ff Y:f P:001B0100 ad:ef52

cpu prgbank3read ad: ef53(f53) data: 8d
cpu prgbank3read ad: ef54(f54) data: 6
cpu prgbank3read ad: ef55(f55) data: 20
8d STA Absolute PC:ef53 A:c X:ff Y:f P:001B0100 ad:2006

cpu prgbank3read ad: ef56(f56) data: a9
cpu prgbank3read ad: ef57(f57) data: 45
a9 LDA Immediate PC:ef56 A:45 X:ff Y:f P:001B0100 ad:ef57

cpu prgbank3read ad: ef58(f58) data: 8d
cpu prgbank3read ad: ef59(f59) data: 6
cpu prgbank3read ad: ef5a(f5a) data: 20
8d STA Absolute PC:ef58 A:45 X:ff Y:f P:001B0100 ad:2006

cpu prgbank3read ad: ef5b(f5b) data: ad
cpu prgbank3read ad: ef5c(f5c) data: 7
cpu prgbank3read ad: ef5d(f5d) data: 20
ad LDA Absolute PC:ef5b A:0 X:ff Y:f P:001B0110 ad:2007

cpu prgbank3read ad: ef5e(f5e) data: ad
cpu prgbank3read ad: ef5f(f5f) data: 7
cpu prgbank3read ad: ef60(f60) data: 20
ad LDA Absolute PC:ef5e A:0 X:ff Y:f P:001B0110 ad:2007

cpu prgbank3read ad: ef61(f61) data: d9
cpu prgbank3read ad: ef62(f62) data: 76
cpu prgbank3read ad: ef63(f63) data: ef
cpu prgbank3read ad: ef85(f85) data: 33
d9 CMP Indexed Absolute (Y) PC:ef61 A:0 X:ff Y:f P:101B0100 ad:ef85

cpu prgbank3read ad: ef64(f64) data: d0
cpu prgbank3read ad: ef65(f65) data: 5
d0 BNE Relative PC:ef64 A:0 X:ff Y:f P:101B0100 ad:ef6b

(does the JMP forever)
cpu prgbank3read ad: ef6b(f6b) data: 4c
cpu prgbank3read ad: ef6c(f6c) data: 6b
cpu prgbank3read ad: ef6d(f6d) data: ef
4c JMP Absolute PC:ef6b A:0 X:ff Y:f P:101B0100 ad:ef6b
Post Reply