News:

11 March 2016 - Forum Rules

Main Menu

Project-Nested MSU-1

Started by Brutapode89, October 11, 2022, 04:52:27 PM

Previous topic - Next topic

Brutapode89

Hi guys. Sorry if I speak MSU-1 games because I'm banned from the Zeldix but I would like just know how Conn has found adresses and values in an emulator, please. An example with the .asm file of The Legend of Zelda (NES) into MSU-1.

;1.3 fixed sxf distorters, mute
;1.4 fixed pause
; 1.5 complete revision, NES code injection through profiles

hirom


org $Cf0000 ; 1c86: $0609: main Track
STA $0609
LDA $2002
cmp #$53
BEQ $04
LDA $0609
RTL
LDA $0609
PHA
STZ $0609
cmp $01c0
BNE $02
PLA
RTL
STZ $2006
STA $2004
STA $01c0
STZ $2005
loop:
Bit $2000
BVS loop
LDA #$FF
STA $2006
PLA
cmp #$08
BEQ noloop
cmp #$06
BEQ noloop
cmp #$04
BEQ noloop
cmp #$02
BEQ noloop
LDA #$03
BRA $02
noloop:
LDA #$01
STA $2007
STA $01c1
RTL


org $CF0100 ; coming from 1af7: 0607:80
STA $0607
LDA $2002
cmp #$53
BEQ $06
LDA $0607
LDY #$00
RTL
LDA $0607
cmp #$80
BEQ run80
cmp #$40
beq run40
LDY #$00
RTL
run80:
PHA
STZ $0607
LDA #$90
PHA
bra runMSU
run40:
PHA
STZ $0607
LDA #$A0
PHA
runMSU:
STZ $0607
cmp $01c0
BNE $03
LDY #$00
RTL
STZ $2006
STA $2004
STA $01c0
STZ $2005
loop2:
Bit $2000
BVS loop2
LDA #$FF
STA $2006
PLA
cmp #$90
BEQ noloop2
LDA #$03
BRA $02
noloop2:
LDA #$01
STA $2007
STA $01c1
LDY #$00
PLA
RTL


org $Cf0200 ; stz $0609 coming from 1d56: 0609:00
LDA #$00
STA $0609
STA $2006
STA $01c0
STA $01c1
RTL



org $Cf0220 ; stz $0607 coming from 1950
STA $0608
STA $0607
PHA
LDA $01c1
cmp #$01
BNE $09
STZ $2006
STA $01c0
STA $01c1
PLA
RTL

org $Cf0240 ; stz $0607 coming from 9f0f and a5ef: 0607:00
LDA #$00
STA $0607
STA $2006
RTL

; not used [1b2c] = 22 60 02 CF EA
org $Cf0260 ; stx $0607 coming from 1b2c 0607:00
LDX #$00
STX $0607
PHA
LDA $01c1
cmp #$01
BNE muteX
loopX:
LDA $2000
AND #$10
BNE loopX
STZ $2006
STZ $01c0
STZ $01c1
muteX:
PLA
RTL


org $CF0280 ; coming from 06772
STA $0605
STA $0607
LDA $2002
cmp #$53
BEQ $04
LDA $0607
RTL
LDA $0607
cmp #$80
BEQ $01
RTL
STZ $0607
LDA #$90
PHA
jmp runMSU


Because I would like already begin with Ice Climber (With only four musics) and after to have gave me examples with the first Zelda, maybe I'll find myself values with Ice Climber. Thanks in advance.

mkwong98

The "Spotting Music Code" section of this doc may help. https://www.romhacking.net/documents/573/

Brutapode89

#2
In fact, Project-Nested games are converted NES ROMS to SNES ROMS.

I don't know if I'm wrong but is this code like example...

cmp #$08
BEQ noloop

...about musics stop playing like "Item get"? Because the track number's 8.