logo
 drop

Main

Community

Submissions

Help

80620038 visitors

Author Topic: Little Nemo - Morningstar Hack (Help Needed)  (Read 1189 times)

Jedi QuestMaster

  • Hero Member
  • *****
  • Posts: 985
  • Location: Disneyland
  • About time, Photobucket--GOSH!
    • View Profile
Little Nemo - Morningstar Hack (Help Needed)
« on: September 24, 2012, 11:47:52 am »
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
And I'll leave it at that!

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 4819
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Little Nemo - Morningstar Hack (Help Needed)
« Reply #1 on: September 24, 2012, 04:21:58 pm »
Well, checking the first routine, it would seem RAM $97 is the level number

So, it looks like the code at $EF15 is

Code: [Select]
LDA $91
CMP #$60
BEQ $EF21
(charging routine)
Lbl_EF21:
JMP $B05B

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)
Code: [Select]
LDA $97       ;level number
CMP #$07    ;is it 7
BCC NoCharge
CMP #$60
BEQ NoCharge
JMP $BF18    ;original charging routine
NoCharge:
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
Quote
Sir Howard Stringer, chief executive of Sony, on Christmas sales of the PS3:
"It's a little fortuitous that the Wii is running out of hardware."

Jedi QuestMaster

  • Hero Member
  • *****
  • Posts: 985
  • Location: Disneyland
  • About time, Photobucket--GOSH!
    • View Profile
Re: Little Nemo - Morningstar Hack (Help Needed)
« Reply #2 on: September 27, 2012, 02:43:38 am »
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?
And I'll leave it at that!

justin3009

  • Hero Member
  • *****
  • Posts: 992
  • Location: Wisconsin
  • Welp
    • View Profile
Re: Little Nemo - Morningstar Hack (Help Needed)
« Reply #3 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
'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

  • Hero Member
  • *****
  • Posts: 985
  • Location: Disneyland
  • About time, Photobucket--GOSH!
    • View Profile
Re: Little Nemo - Morningstar Hack (Help Needed)
« Reply #4 on: September 27, 2012, 08:49:13 am »
That's what I thought until I read this:
(assuming some free space down at $FFFx, which would map to CPU $BFFx)

And B0 FF freezes the game. :(
And I'll leave it at that!

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 4819
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Little Nemo - Morningstar Hack (Help Needed)
« Reply #5 on: September 27, 2012, 12:37:46 pm »
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.
Quote
Sir Howard Stringer, chief executive of Sony, on Christmas sales of the PS3:
"It's a little fortuitous that the Wii is running out of hardware."