Gaming R4CCE - 8-Bit load 'stored' from address

Zerahn

New Member
OP
Newbie
Joined
Feb 3, 2013
Messages
3
Trophies
0
Age
44
XP
51
Country
Canada
Hi! I'm attempting to create a code for Harvest Moon: Sunshine Islands (US) that allows the player to cycle through weather effects for the current day using Select+Up, rather than using 8 different button combinations, one for each weather effect. The code I have so far is this:

Code:
94000130 FFBB0000 (activate when Select+Up is pressed)
DB000000 020DBE54 (load current weather state from 20DBE54 - the problem line)
D4000000 00000001 (add 1 to 'stored')
D8000000 020DBE54 (write 'stored' back into 20DBE54)
920DBE54 00000008 (if current weather = 8, which is not a valid weather type)
220DBE54 00000000 (loop it back to 0)
D2000000 00000000 (and end the code block, resetting 'stored' and 'offset')

As mentioned, the second line is the problem line, as it seems to immediately halt execution of the code. If I omit this and and change the D4 line to D4000000 00000005 it changes the weather to snowing, which is exactly what it should do assuming 'stored' starts out as 0. I'm guessing either the '8-bit load stored from memory location' instruction doesn't work at all, or the wrong code (DB?????? xxxxxxxx) was given in the sheet. Does anyone know how to fix this?

Edit:
Using a 16-bit load (DA?????? xxxxxxxx) instead of the 8-bit load (DB?????? xxxxxxxx) seems to work. Ignore the broken if-condition to loop back to sunny, it isn't working but I can deal with that.
 

Prof. 9

Well-Known Member
Member
Joined
Jun 17, 2008
Messages
324
Trophies
1
Location
The Netherlands
Website
twitter.com
XP
853
Country
Netherlands
Code type DB used to be a bugged code type. Nowadays it should be fixed on most cheat devices. It's possible you used one that doesn't have the fix. Generally if you can use 16-bit load and store you might as well use those.

You will also want to add a D3000000 00000000 line after the D8 line to reset the offset increment and do the loop. Code type 9 should not be affected by the offset register unless its address is 0 (though third-party implementations may vary) but code type 2 WILL be.
 

Zerahn

New Member
OP
Newbie
Joined
Feb 3, 2013
Messages
3
Trophies
0
Age
44
XP
51
Country
Canada
Ah, thank you for the D3 suggestion. I forgot about the auto-increment thing, blah. And it's good to know I wasn't just using the DB thing wrong, my flash card is about a year old. Probably needs the firmware updated or something but it's too much effort right now. x.x
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: But I bet that would be more for a flashcart than a consumer repro board.