Resetting Micro Machines
Moderator: Moderators
Resetting Micro Machines
In Nintendulator and my emulator, if you reset Micro Machines, it crashes the CPU (it jumps to a bad location and executes a KIL instruction). But, I have yet to figure out why. It must be sensitive to initial memory values or the state of the CPU. Anyone have a clue on this one?
Re: Resetting Micro Machines
Did you try to reset twice in a row?
I don't own a copy of Micro Machines, but I do own a copy of Bee 52, and I know that all Codemasters games share library code, such as the "happy face" ROM test and possibly the CHR codec. While testing the Codemasters logo screen for zeroone, I discovered that if I press Reset once, the power light turns off and stays off. If I press Reset again, it comes back up. Perhaps a Reset press at certain points in the program confuses the code that drives the CIC stun circuit.
I don't own a copy of Micro Machines, but I do own a copy of Bee 52, and I know that all Codemasters games share library code, such as the "happy face" ROM test and possibly the CHR codec. While testing the Codemasters logo screen for zeroone, I discovered that if I press Reset once, the power light turns off and stays off. If I press Reset again, it comes back up. Perhaps a Reset press at certain points in the program confuses the code that drives the CIC stun circuit.
Re: Resetting Micro Machines
It's a bit difficult to reset a crashed CPU in an emulator.tepples wrote:Did you try to reset twice in a row?
I don't own a copy of Micro Machines, but I do own a copy of Bee 52, and I know that all Codemasters games share library code, such as the "happy face" ROM test and possibly the CHR codec. While testing the Codemasters logo screen for zeroone, I discovered that if I press Reset once, the power light turns off and stays off. If I press Reset again, it comes back up. Perhaps a Reset press at certain points in the program confuses the code that drives the CIC stun circuit.
Re: Resetting Micro Machines
Instead of choosing Emulation > Soft Reset (FCEUX SDL) or NES > Reset (FCEUX Windows) or Nintendulator's counterpart once, choose the menu item twice.
Re: Resetting Micro Machines
I don't follow. Can you please clarify what you want me to try?tepples wrote:Instead of choosing Emulation > Soft Reset (FCEUX SDL) or NES > Reset (FCEUX Windows) or Nintendulator's counterpart once, choose the menu item twice.
Re: Resetting Micro Machines
I want you to try a soft reset in your emulator, but try it twice in a row. If the first leads to a STP (also called KIL), the second may cause execution to continue.
Or am I misunderstanding what you meant by "a crashed CPU"? Is your emulator's core actually crashing? Or does a soft reset fail to pull it out of STP?
Or am I misunderstanding what you meant by "a crashed CPU"? Is your emulator's core actually crashing? Or does a soft reset fail to pull it out of STP?
Re: Resetting Micro Machines
Ah. I understand now.tepples wrote:I want you to try a soft reset in your emulator, but try it twice in a row. If the first leads to a STP (also called KIL), the second may cause execution to continue.
Or am I misunderstanding what you meant by "a crashed CPU"? Is your emulator's core actually crashing? Or does a soft reset fail to pull it out of STP?
The second reset does pull it out of the halt state; however, it shortly thereafter executes the same KIL instruction that halted it on the first reset. Successive resets produce more halts.
Edit: For testing purposes, I modified my emulator to clear main memory and vram on reset, to reset all the mapper banks and to clear all the CPU registers and flags. And, the CPU still jams on reset! That's really strange. Some other state information is causing this.
Re: Resetting Micro Machines
Create a trace log from a power-on, then from a soft reset. See where they diverge.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Re: Resetting Micro Machines
thefox wrote:Create a trace log from a power-on, then from a soft reset. See where they diverge.
Code: Select all
BFC8 CA DEX A:0B X:B3 Y:01 P:A5 SP:FB CYC:302 SL:240
BFC9 D0 FD BNE $BFC8 A:0B X:B3 Y:01 P:A5 SP:FB CYC:308 SL:240
BFC8 CA DEX A:0B X:B2 Y:01 P:A5 SP:FB CYC:317 SL:240
BFC9 D0 FD BNE $BFC8 A:0B X:B2 Y:01 P:A5 SP:FB CYC:323 SL:240
BFC8 CA DEX A:0B X:B1 Y:01 P:A5 SP:FB CYC:332 SL:240
BFC9 D0 FD BNE $BFC8 A:0B X:B1 Y:01 P:A5 SP:F8 CYC:338 SL:240
0300 4C 1A FC JMP $FC1A A:0B X:B1 Y:01 P:A5 SP:F8 CYC: 27 SL:241
FC1A A6 21 LDX $21 = FA A:0B X:FA Y:01 P:A5 SP:F8 CYC: 36 SL:241
FC1C 9A TXS A:0B X:FA Y:01 P:A5 SP:FA CYC: 45 SL:241
FC1D 6C 03 03 JMP ($0303) = 9EC7 A:0B X:FA Y:01 P:A5 SP:FA CYC: 51 SL:241
9EC7 33 99 RLA ($99),Y = 0000 @ 0001 = 78 A:01 X:FA Y:01 P:24 SP:FA CYC: 66 SL:241
9EC9 CC E6 72 CPY $72E6 = 00 A:01 X:FA Y:01 P:25 SP:FA CYC: 90 SL:241
9ECC 90 3C BCC $9F0A A:01 X:FA Y:01 P:25 SP:FA CYC:102 SL:241
9ECE 18 CLC A:01 X:FA Y:01 P:24 SP:FA CYC:108 SL:241
9ECF 00 BRK A:01 X:FA Y:01 P:24 SP:F7 CYC:114 SL:241
FFFF FF 00 F1 ISB $F100,X @ F1FA = 53 A:AC X:FA Y:01 P:A4 SP:F7 CYC:135 SL:241
Edit:
The last bank in mapper 71 is fixed. Here is the NMI address:
Code: Select all
0F:FFFA:00 BRK
0F:FFFB:03 UNDEFINED
Edit 2:
I can fix the problem by writing $00 to the PPU CTRL register ($2000) on reset, disabling NMI's. Should that be happening?
Re: Resetting Micro Machines
Yes on NES. No on Famicom (reset line is not connected to PPU).zeroone wrote:I can fix the problem by writing $00 to the PPU CTRL register ($2000) on reset, disabling NMI's. Should that be happening?
http://wiki.nesdev.com/w/index.php/PPU_power_up_state
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
- rainwarrior
- Posts: 8731
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Resetting Micro Machines
So Micro Machines has yet another way that it runs properly on an NES but not a Famicom! Interesting.
(The other way is reading $2004.)
(The other way is reading $2004.)
Re: Resetting Micro Machines
It sounds like it should also fail on reset for the NES-101. If anyone has the hardware, please confirm.rainwarrior wrote:So Micro Machines has yet another way that it runs properly on an NES but not a Famicom! Interesting.
(The other way is reading $2004.)
What is the reading $2004 issue?
- rainwarrior
- Posts: 8731
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Resetting Micro Machines
$2004 isn't readable on a lot of Famicom units. Micro Machines polls it to time some raster effects.
Re: Resetting Micro Machines
The wiki says clearly to set $2000 to $00 on powerup and RESET in the NTSC version. Well, so the PPU state is different in a Famicom..???zeroone wrote:I can fix the problem by writing $00 to the PPU CTRL register ($2000) on reset, disabling NMI's. Should that be happening?
- rainwarrior
- Posts: 8731
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Resetting Micro Machines
Indeed:Zepper wrote:The wiki says clearly to set $2000 to $00 on powerup and RESET in the NTSC version. Well, so the PPU state is different in a Famicom..???zeroone wrote:I can fix the problem by writing $00 to the PPU CTRL register ($2000) on reset, disabling NMI's. Should that be happening?
The wiki wrote:On top-loaders (Famicom, NES-101), the Reset button resets only the CPU.