Banner
Views: 779,491,186
Time:
7 users online:  FPzero, Hooded Edge, Matthewsmwhacking, Pitchin Luigi, Powblock532, TheMorganah, Zandro - Guests: 20 - Bots: 196 Users: 40,859 (1,673 active)
Latest: crabb
Tip: Avoid "item babysitting". Do not force the player to drag P-Switches or springboards all around the level. This is not fun, nor does it make for interesting "puzzles".Not logged in.
MSU1 Complications
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - MSU1 Complications
Pages: « 1 »
I'm probably biting off more than I can chew here, but I'm getting impatient.

I have been trying to insert the MSU1 chip into level 105 using LevelASM, but to no avail.
Here's my code:
Quote
ldx #01
stx $2004
-lda $2000
bvs -
lda #$01
sta $2007

ldx #01
stx $2004
-lda $2000
bvs -
lda #$03
sta $2007

lda #$FF
sta $2006

RTS


I copied this from a MSU1 player made by Kawa. Though, I'm not sure if its the code or not, since I could never get their rom to play the music.

And here's my XML file:
Quote
>?xml version="1.0" encoding="UTF-8" ?<
- >cartridge region="NTSC"<
- >rom<
>map mode="linear" address="00-6f:8000-ffff" /<
>map mode="linear" address="80-ff:8000-ffff" /<
>/rom<
- >ram size="2000"<
>map mode="linear" address="70:0000-1fff" /<
>/ram<
- >msu1<
- >mmio<
>map address="00-6f:2000-2007" /<
>map address="80-ff:2000-2007" /<
>/mmio<
>/msu1<
>/cartridge<

( The > and < are swapped so the site doesn't report an error )

So to those who DO understand how to use this enhancement chip, what am I doing wrong?
Check out my Youtube channel! 獣耳 Brony for life.
Originally posted by Ddoomm10
-lda $2000
bvs -

I'm not sure if the - needs a space after it or not, but you want BIT here. Not LDA.
Also you need STZ $2005 after the STX $2004, unless X is already 16bit (and in that case, it'll probably crash since the LDX will assume 8bit).
And I have no idea why you're telling the MSU to play track 1 twice.
(I hope you're putting that in the INIT...)

I didn't check the XML file, so I'm not sure if it's correct. Try reading from $2002. If it returns #$53, then MSU is plugged in.

--------------------
<blm> zsnes users are the flatearthers of emulation
Holy shit. I actually got it to work. If my dad wasn't sleeping in the other room, I'd be jumping off the walls right now.

Err, Here's the code I used for anyone stumbling across this thread:
Quote
levelinit105:
LDA $2002
CMP #$53
BNE levelinit105

ldx #01
stx $2004
stz $2005
- bit $2000
bvs -
lda #$01
sta $2007

lda #$FF
sta $2006

Check out my Youtube channel! 獣耳 Brony for life.
Quote
levelinit105:
LDA $2002
CMP #$53
BNE levelinit105

So you're going to throw in all non-bsnes emulators to an infinite loop.
Sounds nice.

$2002 is #$53 from the start if MSU1 is plugged in. No MSUs are going to magically appear then 5000th time you check. A better method is sending up an error message for non-bsnes.

--------------------
<blm> zsnes users are the flatearthers of emulation
Alright, so...
Quote
LDA $2002
CMP #$53
BEQ MSU1
LDA #$02
STA $1DFB
RTS

MSU1:
ldx #01
stx $2004
stz $2005
- bit $2000
bvs -
lda #$01
sta $2007

lda #$FF
sta $2006
RTS

Does that work?
Check out my Youtube channel! 獣耳 Brony for life.
Yeah, that looks good. I don't have any MSU-compatible music nearby, so I can't test it, but it looks valid.

--------------------
<blm> zsnes users are the flatearthers of emulation
I am happy to have indirectly contributed to this. Alcaro, you can use thisthis to make tracks.

Also, there's no real need to check for MSU1 availability unless you'll do fallback SPC music. If it's not available, sending "play track" commands will effectively do nothing, and the busy loop will terminate immediately because it'll never be nonzero.

It's the data track that causes the bigger compatibility problems and requires an error message.
If your just playing video, it's better to just skip playback then to issue an error. Of course, data tracks can be used for anything, but has anyone used them for anything besides video?

--------------------
Your layout has been removed.
My jukebox sample uses the data stream to store graphics, track names and track counts.

The only graphics data in ROM is the "this requires MSU1 support" error screen.
Pages: « 1 »
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - MSU1 Complications

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2019 - SMW Central
Legal Information - Privacy Policy - Link To Us


Total queries: 7

Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • ROMhacking.net
  • MFGG
  • Gaming Reinvented