It looks like Stars SE fails on almost all the new emulators, looks like it gets into an infinite loop with the Frame IRQ.
It was one of the test roms I was using on PocketNES, suddenly it stopped working, and now I see that the rom itself is broken.
Dwedit wrote:
It looks like Stars SE fails on almost all the new emulators, looks like it gets into an infinite loop with the Frame IRQ.
It was one of the test roms I was using on PocketNES, suddenly it stopped working, and now I see that the rom itself is broken.
Link to ROM? Curious to try it...
You spin me right round baby, right round like a...
No wait, you were looking for Stars SE by Chris Covell. Try going up to the location bar,
deleting everything from "bbs" to the end, and searching for Stars SE.
The ROM never turns off Frame IRQ. Then when the first Frame IRQ hits, it executes RTI to return from the interrupt. But the interrupt was never acknowledged, so it freezes in a loop there. Add a STA #$40 \ STA $4017 somewhere in the rom, and it works. (I stuck it in the IRQ handler, heh)
tepples wrote:
You spin me right round baby, right round like a...
No wait, you were looking for Stars SE by Chris Covell. Try going up to the location bar,
deleting everything from "bbs" to the end, and searching for Stars SE.
Thanks tepples.
Does the demo execute CLI to enable interrupts? Shouldn't interrupts be disabled by default? I have hard time believing Chris didn't test the demo on the real NTSC NES =)
Dwedit wrote:
Add a STA #$40 \ STA $4017 somewhere in the rom, and it works. (I stuck it in the IRQ handler, heh)
Assuming you meant
LDA #$40, that's very clever of you. I'll have to borrow that technique for my new project template to increase its robustness.
Code:
irqHandler:
pha
lda #$40
sta $4017
pla
rti
The demo does use SEI to disable interrupts, but some time later, it executes a CLI instruction for some reason.
Code for Stars SE starts at C200, then it later jumps back to 8007, where the CLI instruction is located.
Appears that the 8000-BFFF bank is a separate binary containing music code and data, named "Music.bin". That part is not provided in the source code distribution, but it's easy enough to extract with a hex editor. The CLI instruction is inside there.
Does Music.bin look like an older version of the NerdTracker II player? If so, the 'cli' might have something to do with sample looping support.
Yeah it was a really, really old version of NT2. I did that cover, I looked in my NT2 folder and it was done in the first version (back when NT2 had PC speaker sound, haha).
A while back, I remade Music.bin with a newer version of NT2. Start with
this NSF.