Conn |
Posted on 19-12-18, 12:29
|
Post: #1 of 7
Since: 12-18-19 Last post: 1793 days Last view: 1792 days |
Hi, I would like to add msu1 support for the favorite game of my youth, Final Fantasy adventure. The asm for the gb rom is relatively simple, I can mute it by ROM0: 119C E0 90 ld (FF00+90),a (this writes the track theme to HRAM FF90, so nop out will result in a mute) ROM0: 119E EA 9B D4 ld (D49B),a (this writes the track number into WRA1 D49B So, if I have the track number, I could very simply modify the SGB bios ram to run a msu code. The problem is: how do I get the byte at GB D49B to an arbitrary snes sgb ram? I found that the gb header is transferred by 00bc11 lda $7000,y [017000] A:e500 X:0000 Y:0000 00bc14 sta $0600,x [010600] A:e5f1 X:0000 Y:0000 into snes ram (this reads gb rom data 0104-014f and transfers it into snes ram 0600-0650 region). But I have no idea how to modify the $7000 (if possible) to read from the offset D49B. Has anybody here maybe a solution how to achieve this goal? All is needed to transfer one byte from GB wram into snes wram... |
NTI |
Posted on 19-12-18, 14:12
|
Post: #26 of 40 Since: 10-29-18 Last post: 711 days Last view: 711 days |
I'm afraid that isn't possible at all, the MSU1 and the Super Game Boy device both use the same pin for audio mixing, as well as the Satellaview. That means neither one of them can be used simultaneously, unless you literally modify the MSU1 spec to virtually upgrade the SNES, given the fact the MSU1 was done to work within the video game specs. |
Conn |
Posted on 19-12-18, 16:33 (revision 3)
|
Post: #2 of 7
Since: 12-18-19 Last post: 1793 days Last view: 1792 days |
Much thanks Colines, it is working but the music is much too silent and I think buggy (sfx delayed sometimes). I sent you a mail with the link to the files to yann.costa... |
NTI |
Posted on 19-12-18, 17:02
|
Post: #27 of 40 Since: 10-29-18 Last post: 711 days Last view: 711 days |
This is really interesting. I theorize the problem lies on the volume mixing levels, since you're pretty much using 3 audio sources: the MSU1, the SGB, and the SPC700 itself. I suppose the code written in the emulator for ssuch task only takes 2 audio sources in consideration. By the way, which emulator are you using? I'm really surprised you were able to put together this situation when the MSU1 isn't supposed to. |
Conn |
Posted on 19-12-18, 20:05 (revision 1)
|
Post: #3 of 7
Since: 12-18-19 Last post: 1793 days Last view: 1792 days |
I use bsnes plus v4. The spc isn't used at all. I destroyed the complete spc700 Apu code and it didn't have any effect at all... So it's only sgb music output and msu... |
creaothceann |
Posted on 19-12-18, 22:26 (revision 1)
|
Post: #224 of 456 Since: 10-29-18 Last post: 44 days Last view: 1 day |
According to this schematic the APU, EXT and CART use separate lines though? My current setup: Super Famicom ("2/1/3" SNS-CPU-1CHIP-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10 |
qwertymodo |
Posted on 19-12-18, 23:58
|
Post: #4 of 4 Since: 10-30-18 Last post: 1799 days Last view: 1798 days |
Posted by NTI This isn't true. The MSU-1 and SGB do use the same pins, the Satellaview does not. However, it's really irrelevant, since they're analog audio lines. There is no "contention" like a digital bus, the results just get averaged out, which in an analog context just mixes the input sounds together. This is the exact same way that the MSU-1 audio or SGB audio, or Satellaview audio gets mixed into the SPC audio. If they couldn't coexist simultaneously, none of those things would work at all. |
Screwtape |
Posted on 19-12-19, 02:52
|
Full mod
Post: #374 of 443 Since: 10-30-18 Last post: 1101 days Last view: 172 days |
Copying information from the Discord chat, at some point (around v100, perhaps?) bsnes changed the way it mixed multiple audio streams, from straight averaging (which implies that each of N channels can have a maximum volume of 1/N of the "real" volume) to something a bit fancier, that doesn't decrease the volume so much. bsnes plus was forked before the audio mixing update, so the low volume of MSU-1 music might just be due to that. If you can get your demo working on a more modern version of bsnes or higan, that would be a better indication. The ending of the words is ALMSIVI. |
NTI |
Posted on 19-12-19, 03:13 (revision 1)
|
Post: #28 of 40 Since: 10-29-18 Last post: 711 days Last view: 711 days |
Thank you for shedding some light into the issue. Not going to oppose an Electrical Engineer! Though I'm still fairly certain, or have heard byuu/Kawa saying, the MSU1 wasn't originally conceived to work with any other device that also uses the same audio mixing pins on the cartridge connector or expansion port. But I refrain from pulling any more educated guesses out of thin air until I get more understanding about the subject. Edit: Eh, classic logical reasoning oversight, it's OR, not AND. xp |
Kawaoneechan |
Posted on 19-12-19, 03:17
|
A man of wealth and taste
Post: #453 of 599 Since: 10-29-18 Last post: 195 days Last view: 1 hour |
Correct me if I'm wrong but wouldn't the cart connector's audio pins and the expansion port's audio pins be two separate pairs 🤔 I mean, if the Satellaview goes into one and the SGB/MSU1 in the other... but don't take my word on that, I only know of the cart side of things! |
Conn |
Posted on 19-12-19, 11:18
|
Post: #4 of 7
Since: 12-18-19 Last post: 1793 days Last view: 1792 days |
Here it is an example: https://drive.google.com/open?id=1BHv15xCKzhzJQThABuNCPf7lxd3CAlhA - Apply ffa_mute.ips on final fantasy adventure (u) [b1].gb - Apply sgbBios.ips on Super Game Boy (World) (Rev 2).sfc - Rename Super Game Boy (World) (Rev 2).sfc into sgBios.sfc - Take a pcm of your choice and rename it into sgbBios-2.pcm - Put the files along with sgbBios.msu into a folder - run bsnes plus -> load special -> load super Game Boy Cartridge load the sgbBios as base cartridge and the final fantasy as Gameboy cartridge You should hear very silent the msu (if you don't try with another pcm (I used dkc_msu-2.pcm) For higan you may need a bml, haven't made one yet, so bsnes plus is the emulator of choice for now. |
NTI |
Posted on 19-12-19, 17:04
|
Post: #29 of 40 Since: 10-29-18 Last post: 711 days Last view: 711 days |
Manifest for higan v106: C:\Users\[name]\Emulation\Super Famicom\Super Game Boy 2 (Japan).sfc\manifest.bml
Also tested on bsnes v113.1, seems to be... Working fine? No lowered volume, sound effects play just fine and aside from the continous BGM (which I believe you did on purpose for the sake of testing), everything went smooth. I did a little comparison to an youtube playthrough, and I couldn't notice anything out of order, but I might be wrong. |
Conn |
Posted on 19-12-19, 23:31
|
Post: #5 of 7
Since: 12-18-19 Last post: 1793 days Last view: 1792 days |
Awesome Colines :D bsnes 113 works just fine!!! Incredible. Now I only need a way to get a gameboy wram into snes ram... do you have any ideas ^^ I report to this bug to devinacker |
Conn |
Posted on 19-12-23, 16:21
|
Post: #6 of 7
Since: 12-18-19 Last post: 1793 days Last view: 1792 days |
For anybody wants to try it out, here's the patch file: It gives msu1 support for Final Fantasy Adventure, but buggy. So it is a proof that it works but not the final solution (screen flickering and maybe not all track changes are recognized): https://drive.google.com/open?id=1EDqWU8-obQqoOPlMiPVcgenxBcuf2eDZ If anybody knows how to implement data_snd to get it bug free, let us know ;) |
Conn |
Posted on 19-12-25, 13:27 (revision 1)
|
Post: #7 of 7
Since: 12-18-19 Last post: 1793 days Last view: 1792 days |
Just a short update, I fixed most bugs of my try patch for FFA (flickering, level-up interruption) and I think (hope) the game is now fully playable. There's only a short graphical glitch for a fraction of a second when the track is smuggled in vram (the most bottom-right tile). This patch may be revised if we find out more about data_snd (or another method), but I think (for now) this glitch is bearable and good to go for a complete PCM set, so I posted it in the dev section of zeldix: http://www.zeldix.net/t2034-final-fantasy-adventure-seiken-densetsu-1-for-super-gameboy#32897 Redownload the patch in first post to have the flickering and other stuff fixed |