HomeForumsWhat's newResources 
 
 
MVSTracker for megadrive released
pascal - May 23, 2006
 pascal May 23, 2006
Finaly, my port of MVSTracker for the megadrive is working on the hardware ( Woohoo!!! thanks to the clues of Charles So go download it and i hope to hear some great composition soon

get everything on www.pascalorama.com...

For now, the driver is very simple, i gonna improve it in the future.Once your composition is good, export the binary using "export MVS0..." from the file menu.Include the resulting file in your code and here follow how to use the driver:

1) Give the driver, the address of the song

move.l #Song_Address,d0

move.l #$a0151a,a0

move.b d0,(a0)+

lsr.l #8,d0

move.b d0,(a0)+

lsr.l #8,d0

move.b d0,(a0)+

move.l #$a0151d,a0

move.b #2,(a0)+

in more human readable language:

#$a0151a = SongAddress & 0xf

#$a0151b = (SongAddress>>8) & 0xf

#$a0151c = (SongAddress>>16) & 0xf

2) Give the play command

move.l #$a0151d,a0

move.b #2,(a0)+ ; 0 :silence 1: loop play 2: play once

Pseudo code:

#$a0151d = Command (0 :silence 1: loop play 2: play once)

 Edge-` May 23, 2006
Wow, great!

Good work pascal. Quick question, when it comes to assembly, I'm still quite a newbie. How would I implement this into my XGCC project?

Music is one of the major missing parts of Genesis development in my opinion, great to see people moving forward.

 pascal May 24, 2006
thanks

unfortunatly i don't have xgcc, i prefer snasm68k it's not really hard to do, load the modplay.bin into z80 ram like done in the sega.s header file.

once it's loaded, u have 4 bytes to set in z80 ram (don't forget the handshake)

#$a0151a = SongAddress & 0xf

#$a0151b = (SongAddress>>8) & 0xf

#$a0151c = (SongAddress>>16) & 0xf

and start the playing

#$a0151d = Command (0 :silence 1: loop play 2: play once)

if i find some time, i gonna try to do a C sample.

regards

pascal