Little Nemo - Morningstar Hack (Help Needed)

Started by Jedi QuestMaster, September 24, 2012, 11:47:52 AM

Previous topic - Next topic

Jedi QuestMaster

Anyone who's played Little Nemo notices the Morningstar sceptor on Nemo's back, but it doesn't come into play until Stage 8: Nightmare Land... OMFGlazyCapcom!

Anyway, my intention is to allow the Morningstar to be used as a bludgeoning weapon from stage 1, but cannot be charged until reaching stage 8.

I found the value that indicates what stage Nemo can use the Morningstar:

01D510: 07 <- change that to '00' & now the game is horribly easy :D

I also found the values that indicate the Morningstar's max power & charge beam sound:

00EF15 - 60 <- change that to '00' & now Nemo can't charge
01A862 - 02 <- change that to 'FF' & now there's no indication whatsoever that the Morningstar can charge

Here's where my expertise comes to an end.

I still need the Morningstar to be able to charge upon reaching stage 8, & I know this will require some Jump routines to fit in the extra code to check what stage the player is on. And with my limited ASM skills, I've tried doing this but can't make heads or tails of the results (game crashing, nothing happening, etc.)

Can anyone lend me a hand/do this whole thing for me? :D


Well, checking the first routine, it would seem RAM $97 is the level number

So, it looks like the code at $EF15 is

LDA $91
CMP #$60
(charging routine)

So it would seem as simple to combine the two (assuming some free space down at $FFFx, which would map to CPU $BFFx)
At $EF12, insert a JMP to whatever address (4C xx xx)

LDA $97       ;level number
CMP #$07    ;is it 7
BCC NoCharge
CMP #$60
BEQ NoCharge
JMP $BF18    ;original charging routine
JMP $B05B   ;go to the same place the original would go without charging

Or A5 97 C9 07 90 07 C9 60 D0 03 4C 18 BF 4C 5B B0
"My watch says 30 chickens" Google, 2018

Jedi QuestMaster

I'm doing exactly as you say, but no matter what stage I'm on it still doesn't charge. :-\

I found some free space at 0FFC0 (0FFB0 w/o header).

So I wrote the JMP as 4C B0 BF. Then wrote the rest as is.

Am I doing anything wrong?


Wait, if the free space is at FFB0, why jump to BFBO?  Wouldn't it just be 4C B0 FF
'We have to find some way to incorporate the general civilians in the plot.'

'We'll kill off children in the Juuban district with an infection where they cough up blood and are found hanging themselves from cherry blossom trees.'

Jedi QuestMaster

That's what I thought until I read this:
Quote from: KingMike on September 24, 2012, 04:21:58 PM
(assuming some free space down at $FFFx, which would map to CPU $BFFx)

And B0 FF freezes the game. :(


Quote from: justin3009 on September 27, 2012, 07:27:38 AM
Wait, if the free space is at FFB0, why jump to BFBO?  Wouldn't it just be 4C B0 FF

NES memory mapping.
Most mappers leave CPU $C000-FFFF permanently mapped ("hardwired") to the last 16KB of the PRG-ROM.
And usually swappable ROM banks are mapped in to $8000-BFFF.
Though some work in 8KB bank sizes, leaving $E000-FFFF hardwired and $8000-DFFF swappable.

Just assuming the typical setup (I think Little Nemo uses MMC3, which is capable of 8KB swaps) that ROMs are mapped to swap in 16KB, then the address of ROM $FFC0 would be: subtract $10 for the iNES header = $FFB0 then mod $3FFF (for 16KB bank size) = $3FB0, then add to the CPU offset where the bank is mapped in = $3FB0 + $8000 = $BFB0.
(though if Little Nemo is swapping in 8KB bank size (haven't checked) the original offset would be ($EF15-10) % $1FFF = $1F05 then it could be added to $8000, $A000 or $C000, giving $9F05, BF05 or DF05.

As to Jedi's question, I guess I'll actually look at the game myself later.
"My watch says 30 chickens" Google, 2018