Code help

Go down

Code help Empty Code help

Post by Polargames Fri 8 Jun 2018 - 0:05

Hello everyone, I hope this is the right place to post, but I have a qusten. I have been wanting to make a msu1 of Wolfenstine 3d, I have been racking my head around on how to do this when I have never done any thing like this before, So when I was googleing up things I had stumble upon this.
Code:
$00 = Evil Incarnate
$01 = Funkie Colonel Bill
$02 = Funk You
$03 = Get Them Before They Get You
$04 = Roster
$05 = The Ultimate Challenge
$06 = U R A Hero
$07 = Zero Hour
$08 = The SS Are Gonna Get You
$09 = The Nazi Rap
$0A = Tiptoein' Around
$0B = End of Level (UNUSED)






00FDB9 JSR $FED0     [00FED0] A:0FFA X:0000 Y:D0F9 S:0FFF D:0000 DB:00 nvmxdIzc  // entry point

// "Zero" decompression routine
00FED0 LDA #$0000             A:0FFA X:0000 Y:D0F9 S:0FFD D:0000 DB:00 nvmxdIzc
00FED3 TCD                    A:0000 X:0000 Y:D0F9 S:0FFD D:0000 DB:00 nvmxdIZc
00FED4 PEA $0FC0              A:0000 X:0000 Y:D0F9 S:0FFD D:0000 DB:00 nvmxdIZc
00FED7 PLB                    A:0000 X:0000 Y:D0F9 S:0FFB D:0000 DB:00 nvmxdIZc
00FED8 PLB                    A:0000 X:0000 Y:D0F9 S:0FFC D:0000 DB:C0 NvmxdIzc
00FED9 LDA $0FC000   [0FC000] A:0000 X:0000 Y:D0F9 S:0FFD D:0000 DB:0F nvmxdIzc  // load # of reads
00FEDD CLC                    A:EC61 X:0000 Y:D0F9 S:0FFD D:0000 DB:0F NvmxdIzc
00FEDE ADC #$1000             A:EC61 X:0000 Y:D0F9 S:0FFD D:0000 DB:0F NvmxdIzc
00FEE1 STA $02       [000002] A:FC61 X:0000 Y:D0F9 S:0FFD D:0000 DB:0F NvmxdIzc
00FEE3 SEP #$20               A:FC61 X:0000 Y:D0F9 S:0FFD D:0000 DB:0F NvmxdIzc
00FEE5 LDY #$C002             A:FC61 X:0000 Y:D0F9 S:0FFD D:0000 DB:0F NvMxdIzc
00FEE8 LDX #$0000             A:FC61 X:0000 Y:C002 S:0FFD D:0000 DB:0F NvMxdIzc
00FEEB LDA $0000,y   [0FC002] A:FC61 X:0000 Y:C002 S:0FFD D:0000 DB:0F nvMxdIZc
00FEEE BEQ $FEF8     [00FEF8] A:FC00 X:0000 Y:C002 S:0FFD D:0000 DB:0F nvMxdIZc  // if $00, get length...
00FEF0 STA $7E1000,x [7E1007] A:FCFF X:0007 Y:C004 S:0FFD D:0000 DB:0F NvMxdIzc  // else, write as is...
00FEF4 INX                    A:FC12 X:0043 Y:C05E S:0FFD D:0000 DB:0F nvMxdIzc
00FEF5 JMP $FF09     [00FF09] A:FC12 X:0044 Y:C05E S:0FFD D:0000 DB:0F nvMxdIzc

00FEF8 INY                    A:FC00 X:0000 Y:C002 S:0FFD D:0000 DB:0F nvMxdIZc
00FEF9 LDA $0000,y   [0FC003] A:FC00 X:0000 Y:C003 S:0FFD D:0000 DB:0F NvMxdIzc  // load length byte
00FEFC STA $00       [000000] A:FC07 X:0000 Y:C003 S:0FFD D:0000 DB:0F nvMxdIzc
00FEFE LDA #$00               A:FC07 X:0000 Y:C003 S:0FFD D:0000 DB:0F nvMxdIzc
00FF00 STA $7E1000,x [7E1000] A:FC00 X:0000 Y:C003 S:0FFD D:0000 DB:0F nvMxdIZc
00FF04 INX                    A:FC00 X:0000 Y:C003 S:0FFD D:0000 DB:0F nvMxdIZc
00FF05 DEC $00       [000000] A:FC00 X:0001 Y:C003 S:0FFD D:0000 DB:0F nvMxdIzc
00FF07 BNE $FF00     [00FF00] A:FC00 X:0001 Y:C003 S:0FFD D:0000 DB:0F nvMxdIzc  // if not done, loop...
00FF09 INY                    A:FC00 X:0007 Y:C003 S:0FFD D:0000 DB:0F nvMxdIZc
00FF0A CPX $02       [000002] A:FC00 X:0007 Y:C004 S:0FFD D:0000 DB:0F NvMxdIzc
00FF0C BCC $FEEB     [00FEEB] A:FC00 X:0007 Y:C004 S:0FFD D:0000 DB:0F nvMxdIzc  // if not end of data, loop...
00FF0E PEA $007E              A:FC00 X:FC61 Y:FF43 S:0FFD D:0000 DB:0F nvMxdIZC
00FF11 PLB                    A:FC00 X:FC61 Y:FF43 S:0FFB D:0000 DB:0F nvMxdIZC
00FF12 PLP                    A:FC00 X:FC61 Y:FF43 S:0FFC D:0000 DB:7E nvMxdIzC
00FF13 REP #$20               A:FC00 X:FC61 Y:FF43 S:0FFD D:0000 DB:7E nvmxdizc
00FF15 RTS                    A:FC00 X:FC61 Y:FF43 S:0FFD D:0000 DB:7E nvmxdizc  // exit routine
Now I did not make this I had found this from romhacking fourms and I thought this might be my only guide on how to make a msu1 patch for the game, because I do not know what all of this means, could someone explain what I had found. If I can get it to work I will deffently give credit to the Rom hacking fourm, and who ever helps me out as well. Thank you
Polargames
Polargames

Code help Image112

Since : 2018-06-06

Back to top Go down

Code help Empty Re: Code help

Post by Conn Fri 8 Jun 2018 - 16:48

Well, I can more or less read that code, but it doesn't appear to be connected to music. It also says decompression routine that usually applies to gfx.
Usually it is lda #$music track sta $214x for the audio port.
Conn
Conn

Code help Image212

Since : 2013-06-30

Back to top Go down

Code help Empty Re: Code help

Post by Polargames Sat 9 Jun 2018 - 0:49

Conn wrote:Well, I can more or less read that code, but it doesn't appear to be connected to music. It also says decompression routine that usually applies to gfx.
Usually it is lda #$music track sta $214x for the audio port.

Thank you very much Conn, and thanks for telling me this had nothing to do with the music, Now I also had this,
Code:
+------------+------------+
|  ROM Data  |  RAM Data  |
|  $CF:E250  |  $7E:8AE3  |
+------------+------------+
[02] [00 01] = $0002: Map 1-1
[03] [00 01] = $0003: Map 1-2
[05] [00 01] = $0005: Map 1-B
[01] [00 01] = $0001: Map 2-1
[02] [00 01] = $0002: Map 2-2
[03] [00 01] = $0003: Map 2-3
[05] [00 01] = $0005: Map 2-B
[08] [00 01] = $0008: Map 3-1
[01] [00 01] = $0001: Map 3-2
[02] [00 01] = $0002: Map 3-3
[05] [00 01] = $0005: Map 3-B
[09] [00 01] = $0009: Map 3-S
[01] [00 01] = $0001: Map 4-1
[09] [00 03] = $0009: Map 4-2
             = $0000: Map 4-3
[03] [00 01] = $0003: Map 4-4
[05] [00 01] = $0005: Map 4-B
[07] [00 01] = $0007: Map 5-1
[09] [00 01] = $0009: Map 5-2
[0A] [00 01] = $000A: Map 5-3
[08] [00 03] = $0008: Map 5-4
             = $0000: Map 5-5
[05] [00 01] = $0005: Map 5-B
[01] [00 01] = $0001: Map 6-1
[02] [00 01] = $0002: Map 6-2
[07] [00 03] = $0007: Map 6-3
             = $0000: Map 6-4
[0A] [00 01] = $000A: Map 6-5
[05] [00 01] = $0005: Map 6-B
[09] [00 FF] = $0009: Map 6-S



$C0/354C [F4 00 00]    PEA $0000  // Title screen (when returning from game over/credits)
$C0/4021 [F4 00 00]    PEA $0000  // Title screen (when returning from game demo)
$C0/4213 [F4 06 00]    PEA $0006  // Mission briefing
$C0/4E0C [F4 04 00]    PEA $0004  // Level complete
$C0/523C [F4 06 00]    PEA $0006  // Final score
$C0/55B1 [F4 0A 00]    PEA $000A  // Credits
$C0/7340 [F4 00 00]    PEA $0000  // Title screen (when booting up)



$00 = Evil Incarnate
$01 = Funkie Colonel Bill
$02 = Funk You
$03 = Get Them Before They Get You
$04 = Roster
$05 = The Ultimate Challenge
$06 = U R A Hero
$07 = Zero Hour
$08 = The SS Are Gonna Get You
$09 = The Nazi Rap
$0A = Tiptoein' Around
$0B = End of Level (UNUSED)

Would this be what a person would be looking for. I have no clue if it is or not. Thank you
Polargames
Polargames

Code help Image112

Since : 2018-06-06

Back to top Go down

Code help Empty Re: Code help

Post by Conn Sat 9 Jun 2018 - 13:46

I've tried to trace it, and though I have much experience, the music engine is so weird that I could not find the trigger for changing tracks on brief looking. Sorry.
Conn
Conn

Code help Image212

Since : 2013-06-30

Back to top Go down

Code help Empty Re: Code help

Post by Polargames Sat 9 Jun 2018 - 16:14

Conn wrote:I've tried to trace it, and though I have much experience, the music engine is so weird that I could not find the trigger for changing tracks on brief looking. Sorry.

Thank you very much Conn, Now in your experence opinon is Wolfenstine 3D a snes game that cannot be msu1. If it is thats fine I was just asking from what you had stated. Thank you again Smile
Polargames
Polargames

Code help Image112

Since : 2018-06-06

Back to top Go down

Code help Empty Re: Code help

Post by Conn Sat 9 Jun 2018 - 17:08

I am sure every game can be msu:ed... Every company uses its own technique to implement audio, but the code this game uses is alien to me Sad

I suggest you'd rather ask the author who found the notes whether he can help you
Conn
Conn

Code help Image212

Since : 2013-06-30

Back to top Go down

Code help Empty Re: Code help

Post by Polargames Sun 10 Jun 2018 - 22:43

Conn wrote:I am sure every game can be msu:ed... Every company uses its own technique to implement audio, but the code this game uses is alien to me Sad

I suggest you'd rather ask the author who found the notes whether he can help you


Hello Conn,

I think I might of cracked it. Here is what I got,
Code:
0000:0201 CD EF   mov  x,#FF          ;\
  0000:0203 BD      mov  sp,x           ; zerofill RAM at [0001h..00EFh]
  0000:0204 E8 00   mov  a,#00          ; (ie. excluding I/O Ports at F0h..FFh)
                   @@zerofill_lop:      ; (though [00h..01h] destroyed below)
  0000:0206 5D      mov  [x],a          ; (also sets stacktop to 01EFh, kinda
  0000:0218 1D      dec  x              ; messy, nicer would be stacktop 01FFh)
  FFC7 D0 FC        jnz  @@zerofill_lop ;/
  FFC9 8F AA F4     movw  [F4],ya       ;\notify Main CPU that APU is ready
  0000:0220 DA F6   movw  [F6],ya       ;/for communication
                   @@wait_for_cc:       ;\
  0000:0224 64 F7   cmp    a,F7         ; wait for initial "kick" value
  FFD2 D0 FB        jnz  @@wait_for_cc  ;/
  FFD4 2F 19        jr   main
                   ;---
                   @@transfer_data:
                   @@wait_for_00:                               ;\
  0000:022c BA F4   mov  y,[F4]     ;index (should become 0)    ;
  FFD8 D0 FC        jnz  @@wait_for_00                          ;/
                   @@transfer_lop:
  0000:228 64  17   cmp  a,17
 0000:023B 1F 3E 02 jmp  [023E+x] ----->
0000:0287 5D mov  x,a   ;get data
0000:0289  7D     mov  a,x    ;ack data
0000:0292 CB  F2 mov F2,y;store data
0000:0285 3D inc  x         ;addr lsb
0000:0281F 2F 3E jmp [3F2F+x] @transfer_lop
0000:02BE 3D   inc  x      ;addr msb
                   @@
  FFE9 10 EF        jns  @@transfer_lop     ;strange...
  FFEB 7E F4        cmp  y,[F4]
  FFED 10 EB        jns  @@transfer_lop
                   ;- - -
                   main:
  FFEF BA F6        movw ya,FA              ;\copy transfer (or entrypoint)
  FFF1 DA 00        movw [00],ya    ;addr       ;/address to RAM at [0000h]
  0000:022C BA F4  movw ya,[F4]    ;cmd:kick
  0000:022E DA 14  mov 14y,a   ;ack kick
  0000:0234 DD        mov  a,y        ;cmd
  0000:023A 5D      mov  x,a        ;cmd
  FFF9 D0 DB        jnz  @@transfer_data
  0000:023B 1F 3E 02 jmp  [023E+x]   ;in: A=0, X=0, Y=0, SP=EFh, PSW=02h
                   ;---
  FFFE C0 FF        dw   FFC0  ;reset vector
Does this have anything to do with the music. I think it does but I am not sure. Confused
Polargames
Polargames

Code help Image112

Since : 2018-06-06

Back to top Go down

Code help Empty Re: Code help

Post by Conn Mon 11 Jun 2018 - 3:26

I have no idea. Is a track id used here?
Conn
Conn

Code help Image212

Since : 2013-06-30

Back to top Go down

Code help Empty Re: Code help

Post by Polargames Mon 11 Jun 2018 - 22:03

Conn wrote:I have no idea. Is a track id used here?

O sorry that is the wrong file, I have attached the one that I was going to post, but its a little long and if it does not contain anything for the music tracks in your honest opioin shold I just toss in the towel on this, bucause I am starting to get burned out fact, and with me being new to this was this game a hard one to start with? Also what debugger do you use?


Last edited by Polargames on Mon 11 Jun 2018 - 22:06; edited 1 time in total (Reason for editing : File did not show up)
Polargames
Polargames

Code help Image112

Since : 2018-06-06

Back to top Go down

Code help Empty Re: Code help

Post by Conn Tue 12 Jun 2018 - 4:48

As I told you before, I cannot find the trigger for a track change. Without it, I cannot substitute the game with msu.
When setting a breakpoint to an address in your log it is active AFTER title screen and intro, so I guess it isn't right.
I use Geiger snes9x debugger and you? It's interesting that your trace is logging cpu and apu in the same log.

What you would need to know is where the music id:s come from you posted here:

$00 = Evil Incarnate
$01 = Funkie Colonel Bill
$02 = Funk You
$03 = Get Them Before They Get You
$04 = Roster
$05 = The Ultimate Challenge
$06 = U R A Hero
$07 = Zero Hour
$08 = The SS Are Gonna Get You
$09 = The Nazi Rap
$0A = Tiptoein' Around
$0B = End of Level (UNUSED)
How did this guy get them? This might be the trigger you need.
Conn
Conn

Code help Image212

Since : 2013-06-30

Back to top Go down

Code help Empty Re: Code help

Post by Polargames Tue 12 Jun 2018 - 14:15

Conn wrote:As I told you before, I cannot find the trigger for a track change. Without it, I cannot substitute the game with msu.
When setting a breakpoint to an address in your log it is active AFTER title screen and intro, so I guess it isn't right.
I use Geiger snes9x debugger and you? It's interesting that your trace is logging cpu and apu in the same log.

What you would need to know is where the music id:s come from you posted here:

$00 = Evil Incarnate
$01 = Funkie Colonel Bill
$02 = Funk You
$03 = Get Them Before They Get You
$04 = Roster
$05 = The Ultimate Challenge
$06 = U R A Hero
$07 = Zero Hour
$08 = The SS Are Gonna Get You
$09 = The Nazi Rap
$0A = Tiptoein' Around
$0B = End of Level (UNUSED)
How did this guy get them? This might be the trigger you need.

I am going to give it a try, I have been trying to login on Rom hacks, I was able to make an account, but now it will not let me sign in. Every time I put in my password I get a error notice and the weird part is its the same password I use here. Confused The username of the person that showed the code is DarkSamus993, He also has stated this

"I did a little debugging and found how the maps index which song to play. There's control codes mixed in with the song values that tell the game how to copy the data to RAM (see note below), but it's easy enough to swap songs around.

NOTE: The game uses a compression scheme where the value $00 is the flag-byte and the next byte is how many times to write the value $00 to RAM. The rest of the data stream is written as is.""

Code:
$FD7A2 = Song data ptrs
$FE250 = Map Song IDs

Does this mean its harder to find, Or is this easy for someone that is more advence?   Confused
Polargames
Polargames

Code help Image112

Since : 2018-06-06

Back to top Go down

Code help Empty Re: Code help

Post by Conn Tue 12 Jun 2018 - 18:16

I sent him a pm at romhacking and pointed him here. With a bit of luck he is able to help you on this Wink

Edit: ok, I understood his notes and it got clear to me.

For the level music you need to hook here:
$C0/D98F BD E3 8A LDA $8AE3,x[$7E:8AE3] A:0000 X:0000 Y:0001 D:0FDE DB:7E S:0FDA P:envmxdiZc HC:1256 VC:016 FC:49 I:00
$C0/D992 48 PHA A:0002 X:0000 Y:0001 D:0FDE DB:7E S:0FDA P:envmxdizc HC:1
But this is only valid for the level music (no prob, he also made notes on the other tracks) but I would not know yet how to mute the spc. Maybe in the apu.


Last edited by Conn on Tue 12 Jun 2018 - 18:34; edited 1 time in total
Conn
Conn

Code help Image212

Since : 2013-06-30

Back to top Go down

Code help Empty Re: Code help

Post by Polargames Tue 12 Jun 2018 - 18:30

Conn wrote:I sent him a pm at romhacking and pointed him here. With a bit of luck he is able to help you on this Wink

Awesome, Thank you very much Conn, Very Happy O I had forgot to post this to you, the debugger I had used is called bsnes-plus-073+. Is this a good one to use or should I use the one you have?
Polargames
Polargames

Code help Image112

Since : 2018-06-06

Back to top Go down

Code help Empty Re: Code help

Post by Conn Tue 12 Jun 2018 - 18:38

I edited the post above, I know how to switch themes now:

hook at
$C0/D98F BD E3 8A LDA $8AE3,x[$7E:8AE3] A:0000 X:0000 Y:0001
$C0/D992 48 PHA A:0002 X:0000 Y:0001

It loads level specific themes from ram address 7e:8ae3 in dependence of the X value.
It's easy to switch to msu here then. It's for the ingame levels

The other themes must be hooked here:
Code:

$C0/354C [F4 00 00]    PEA $0000  // Title screen (when returning from game over/credits)
$C0/4021 [F4 00 00]    PEA $0000  // Title screen (when returning from game demo)
$C0/4213 [F4 06 00]    PEA $0006  // Mission briefing
$C0/4E0C [F4 04 00]    PEA $0004  // Level complete
$C0/523C [F4 06 00]    PEA $0006  // Final score
$C0/55B1 [F4 0A 00]    PEA $000A  // Credits
$C0/7340 [F4 00 00]    PEA $0000  // Title screen (when booting up)

Muting the spc... maybe hardcore mute works.

As for debugger, bsnes is fine. I prefer geiger, but only because I work with it for 10 years now.
Conn
Conn

Code help Image212

Since : 2013-06-30

Back to top Go down

Code help Empty Re: Code help

Post by Conn Tue 12 Jun 2018 - 18:43

Maybe it works also if you only use one hook at
$C0/61EB

e.g.,
$C0/61EB 3B TSC A:0002
02 is the first map

$C0/61EB 3B TSC A:0FEB
EB is the title screen
and so on.
Conn
Conn

Code help Image212

Since : 2013-06-30

Back to top Go down

Code help Empty Re: Code help

Post by Polargames Tue 12 Jun 2018 - 18:44

Conn wrote:I edited the post above, I know how to switch themes now:

hook at
$C0/D98F BD E3 8A LDA $8AE3,x[$7E:8AE3] A:0000 X:0000 Y:0001
$C0/D992 48 PHA A:0002 X:0000 Y:0001

It loads level specific themes from ram address 7e:8ae3 in dependence of the X value.
It's easy to switch to msu here then. It's for the ingame levels

The other themes must be hooked here:
Code:

$C0/354C [F4 00 00]    PEA $0000  // Title screen (when returning from game over/credits)
$C0/4021 [F4 00 00]    PEA $0000  // Title screen (when returning from game demo)
$C0/4213 [F4 06 00]    PEA $0006  // Mission briefing
$C0/4E0C [F4 04 00]    PEA $0004  // Level complete
$C0/523C [F4 06 00]    PEA $0006  // Final score
$C0/55B1 [F4 0A 00]    PEA $000A  // Credits
$C0/7340 [F4 00 00]    PEA $0000  // Title screen (when booting up)

Muting the spc... maybe hardcore mute works.

As for debugger, bsnes is fine. I prefer geiger, but only because I work with it for 10 years now.
Very Happy Wow sweet, So use the code you have above and then put it in inbetween the reast of the of the code? Did I understand it right?
Polargames
Polargames

Code help Image112

Since : 2018-06-06

Back to top Go down

Code help Empty Re: Code help

Post by Conn Wed 13 Jun 2018 - 13:38

Here:
https://www.zeldix.net/t1724-wolfenstein-msu-1#26734

Please note that I am retired. This took me at least 5 hours to trace the stuff. With all respect to your ambitions, if you do not know how to make hook, you will need much help that I cannot offer due to time reasons.
So Kirby and Wolf-3D were more or less hidden requests for the code (in my point of view). I did both codes for you now, just like you have depressions, I have a burn-out from this stuff. So as self protection, I will ignore all help requests from now on, to not let myself draw further into projects again.

It's nothing personal against you, I like you, otherwise I would not help. But you see, I again have 4 projects being drawn into though I didn't want: Earthbound, YS5, Kirby, Wolfenstein.
I really have to stop at one point!
Conn
Conn

Code help Image212

Since : 2013-06-30

Back to top Go down

Code help Empty Re: Code help

Post by Polargames Wed 13 Jun 2018 - 15:53

Conn wrote:Here:
https://www.zeldix.net/t1724-wolfenstein-msu-1#26734

Please note that I am retired. This took me at least 5 hours to trace the stuff. With all respect to your ambitions, if you do not know how to make hook, you will need much help that I cannot offer due to time reasons.
So Kirby and Wolf-3D were more or less hidden requests for the code (in my point of view). I did both codes for you now, just like you have depressions, I have a burn-out from this stuff. So as self protection, I will ignore all help requests from now on, to not let myself draw further into projects again.

It's nothing personal against you, I like you, otherwise I would not help. But you see, I again have 4 projects being drawn into though I didn't want: Earthbound, YS5, Kirby, Wolfenstein.
I really have to stop at one point!


O, I... You did not have to work on it for the 5 hours, I am sorry Crying or Very sad. Why I wanted to make a msu1 hack was to learn how to do it, use it as a motivation to help me fight my depression, and 3 was to give back to all of you guys. I have been very greatful with all of your work, and because I love what everyone has done, I wanted to give back. I did not honstly know how much work was involed in it, I honstly did read all of the links I was given on the asm file, I also looked up how the whole SPC700 works etc.. I was really giving it my all to make it work, I even played more with bsnes to understand how that worked and snes9x, That is why I had asked you what you had used because I had saw you as a teacher, hell your one of a few very understanding and patient ones I have ever had. I thought that it was awesome to have someone like you to lend a hand to help out a noob like me. I never ment to make this a whole project for you to work on, I did not know I was so bad at it. Again I am sorry. Crying or Very sad  Thank you for leting me know and I would like to say please do not be mad at me because I did ask for kirby where in bsnes to right in. I am not mad at you or anything I honstly still like you and your still in my top 10 best teachers ever, I did not ever intend it to be a 99:1 ratio on the project. when it gets published I will give you all credit, I have no issue with that. I so sorry. I also like you as well and again my message like yours is nothing personal. I did not know it had gone that far Blue2
Polargames
Polargames

Code help Image112

Since : 2018-06-06

Back to top Go down

Code help Empty Re: Code help

Post by Conn Wed 13 Jun 2018 - 17:25

Lol* I can tell you, coding is not a way to fight depression. It's only good to fight boringness.
But since you have no experience at all, you really shouldn't start with something complex like msu. Kirby was one of the easy games, but wolfenstein is highly advanced. I code for 15 years already and this was a hard nut to crash.
You miss the basics of asm and how to use a debugger and such. Believe me when I say that msu isn't a good point to start: it involves all basic asm (hooks, addressing, register and ram savings) as well as higher advanced apu hacking. I also can't tell you where to start, but e.g. zelda is quite disassembled (thanks to mon). Here are many people with small requests like wizzzrobemaster wants here and there stuff like no heart drop after boss fight. Such things are easier.
If you really want to step into msu you'd need to understand every line in the asm of Kirby I posted (why I hooked where to where, how I muted spc and why that worked, which registers I wrote to and why in 24 bit ($40 sram is in the db). You see, the matter is complex. Also you may want to focus on one thing, either create pcm or asm. I never created even one pcm.

All in all, it was a favor to you but I really want to get rid of msu hacking (I coded maybe 50 msu asm or helped on them). It's not my life task. Also I nowadays have a strict time schedule and can't teach from point zero...
Conn
Conn

Code help Image212

Since : 2013-06-30

Back to top Go down

Code help Empty Re: Code help

Post by Polargames Wed 13 Jun 2018 - 19:28

Conn wrote:Lol* I can tell you, coding is not a way to fight depression. It's only good to fight boringness.
But since you have no experience at all, you really shouldn't start with something complex like msu. Kirby was one of the easy games, but wolfenstein is highly advanced. I code for 15 years already and this was a hard nut to crash.
You miss the basics of asm and how to use a debugger and such. Believe me when I say that msu isn't a good point to start: it involves all basic asm (hooks, addressing, register and ram savings) as well as higher advanced apu hacking. I also can't tell you where to start, but e.g. zelda is quite disassembled (thanks to mon). Here are many people with small requests like wizzzrobemaster wants here and there stuff like no heart drop after boss fight. Such things are easier.
If you really want to step into msu you'd need to understand every line in the asm of Kirby I posted (why I hooked where to where, how I muted spc and why that worked, which registers I wrote to and why in 24 bit ($40 sram is in the db). You see, the matter is complex. Also you may want to focus on one thing, either create pcm or asm. I never created even one pcm.

All in all, it was a favor to you but I really want to get rid of msu hacking (I coded maybe 50 msu asm or helped on them). It's not my life task. Also I nowadays have a strict time schedule and can't teach from point zero...

Understanable, I did not honstly know how complex it truely was. I also did not know that I really jumped the shrak so to speak on Wolfenstine. I didn't know that it was super hard, and Kirby would have been easy, I though it would been the other way around. I know you have said that I missed the basics of asm, but I had read the links that were given to me and I did my best to understand it, I also read on how the snes sound worked and such. Was it because I had no expernice in codeing thats why or was I dumb in try to do something like this. I know you had said codeing is not a good way to fight depression, but It did help me to deal with it. I had a goal and that kept me motivated and it help to fight the black hole that I feel everyday. It was fun because you were helping me a long the way, so it was like going to a class and sitting next to a cool new friend and better yet the cool guy was giving you pointers on how to do a project. Did I become like wizzzrobemaster? if I did I am sorry :-(, I honstly did not set out to become like that at all. I wanted to learn something new because I wanted to be a more well rounded person and also make a gift for my friend, I have a friend that has been cancer free now 7 years and his brother had told me years ago before that had ever happened that he loved doom and Wolfenstine, So when I had found out about the msu1 and did some google searching and found cool music that I think would be sweet in the game I had said to myself, You know if I could learn how to do that would make a awesome gift for him, Ofcource I would include you in it because your my teacher and if you hand not kindly lend a helping hand out for me I could never have this become true. So I thank you because you could of easily said nope, not going to help this noob out, but you didn't and I for one cannot thank you enought because you help me make something I thought would never come true, and reality. So your an awesome admin for this site and one hell of a cool partner. I again am sorry for it becomeing more then what I had thought and for the extra stress with it, again I never ever thought it would be come a huge monster.
Polargames
Polargames

Code help Image112

Since : 2018-06-06

Back to top Go down

Code help Empty Re: Code help

Post by Conn Wed 13 Jun 2018 - 20:31

No need to dramatice things and no need to apologize... Very Happy do as you like, learn coding if you wish and make some awesome patches. It's just me who wants to end it, you want to begin.
Much luck Spin
Conn
Conn

Code help Image212

Since : 2013-06-30

Back to top Go down

Code help Empty Re: Code help

Post by Puzzledude Wed 13 Jun 2018 - 20:56

hook at
$C0/D98F BD E3 8A LDA $8AE3,x[$7E:8AE3] A:0000 X:0000 Y:0001
$C0/D992 48 PHA A:0002 X:0000 Y:0001
It loads level specific themes from ram address 7e:8ae3 in dependence of the X value.
It's easy to switch to msu here then. It's for the ingame levels

Wow sweet, So use the code you have above and then put it in in between the rest of the of the code? Did I understand it right?

You don't really put the new code in between the old code, you put it where the empty space is. Main problem with ASM is to trace everything and then figuere it out where the game is reading the music from.

Once you realize this (above apparently on C0/D98F with the command BD= LDA). "hook at" means make the JSL (long jump to new code) here. You will jump to new address (ie empty space) using a 3 byte pointer in little endian (ie address in 3 bytes written reversed) and then write your own code there, to tell the game to instead of doing the regular, rather do the MSU1. But again you need the new code in this empty space. Maybe take a look on how A Link to the Past MSU-1 was made, to then learn and try to do a similar thing on Kirby.
Puzzledude
Puzzledude

Code help Image213

Since : 2012-06-20

Back to top Go down

Code help Empty Re: Code help

Post by Polargames Thu 14 Jun 2018 - 1:09

Conn wrote:No need to dramatice things and no need to apologize... Very Happy do as you like, learn coding if you wish and make some awesome patches. It's just me who wants to end it, you want to begin.
Much luck Spin

Hello Conn, Sorry about me dramatice things, I did not realize I did it, After I had read your post my anxiety had kicked into overdrive and it took over, I am ok now, The meds have it now under control, It was just one of thoes days for me. I thank you though for all of the help. Smile
Polargames
Polargames

Code help Image112

Since : 2018-06-06

Back to top Go down

Code help Empty Re: Code help

Post by Polargames Thu 14 Jun 2018 - 1:18

Puzzledude wrote:
hook at
$C0/D98F BD E3 8A LDA $8AE3,x[$7E:8AE3] A:0000 X:0000 Y:0001
$C0/D992 48 PHA A:0002 X:0000 Y:0001
It loads level specific themes from ram address 7e:8ae3 in dependence of the X value.
It's easy to switch to msu here then. It's for the ingame levels

Wow sweet, So use the code you have above and then put it in in between the rest of the of the code? Did I understand it right?

You don't really put the new code in between the old code, you put it where the empty space is. Main problem with ASM is to trace everything and then figuere it out where the game is reading the music from.

Once you realize this (above apparently on C0/D98F with the command BD= LDA). "hook at" means make the JSL (long jump to new code) here. You will jump to new address (ie empty space) using a 3 byte pointer in little endian (ie address in 3 bytes written reversed) and then write your own code there, to tell the game to instead of doing the regular, rather do the MSU1. But again you need the new code in this empty space. Maybe take a look on how A Link to the Past MSU-1 was made, to then learn and try to do a similar thing on Kirby.


Hello Puzzledude, No I did not put in new code where the old code was. I actually stoped at that point to read some more on asm, I had thought by my reading and understanding the best I could I had a good grasp, Well my grasp of msu was weaker then Armogohma Very Happy. I will take up your advice on Kirby and take a look at what was done for A link to the past. I thank you for your advice. :-)
Polargames
Polargames

Code help Image112

Since : 2018-06-06

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum