Any example code for the games master cart?

This area for discussing Assembly language.

Re: Any example code for the games master cart?

Postby nowhereman999 » Wed Oct 25, 2017 10:25 pm

Hi Sixxie (Cairan),

This is too funny, I was just chatting with Paul Thayer and he sent me a copy of dzip, and the 6809 decompressor. He only had the .exe file but now with your link I can compile it for my Mac. The decompressor is amazingly small, fantastic job! Thanks for sharing this with the world. :)

I haven't looked at your code too closely but it looks like your code is doing run length encoding, my MIDI converter is doing that while playing back the Game Master Cartridge format otherwise I'd run out of RAM playing a song that is only a couple minutes long and that won't be good for anyone who wants to put their music on a cartridge. What I'm working on is some Lempel,Ziv,Welch compression which should really compress the crap out of the audio playback data even with the RLE already applied.

I have used SLZ before and the 6809 decompressor for it. I attached the copy of SLZ below for others to use. As the name implies it does Lempel Ziv compression, I actually used it as the loader for my Pac Man game and it does a great job compressing data. But I want to learn more about LZW and it would be nice if my MIDI to CoCo converter just handles everything internally to keep it nice and clean for anyone who wants to use the output for their games or just to play with.

Cheers,
Glen
Attachments
CoCo3_SLZ_Compression.zip
SLZ compressor C source code and 6809 decompression code.
(6.39 KiB) Downloaded 66 times
nowhereman999
 
Posts: 33
Joined: Mon Sep 18, 2017 11:43 pm

Re: Any example code for the games master cart?

Postby sixxie » Thu Oct 26, 2017 7:27 am

Nah dzip isn't RLE, it's basically LZ77 with two different sizes for length+distance and a "special" for verbatim data.

Matches can either be up to 128 bytes from up to 128 bytes before, or up to 256 bytes from up to 16384 bytes before (longer code sequence). Verbatim runs are up to 128 bytes long.

Thanks for the SLZ source, though - I know I had a copy once, but no idea where it got to.
sixxie
 
Posts: 8
Joined: Tue Oct 17, 2017 9:19 am

Re: Any example code for the games master cart?

Postby nowhereman999 » Thu Oct 26, 2017 8:00 pm

HI Sixxie,

Very cool, to hear your compression program is using LZ77 especially since the decompressor is so small. I'll keep working on mine just to learn from, I'm sure your code will be very useful in future projects. Thanks again for sharing it. :)

Cheers,
Glen
nowhereman999
 
Posts: 33
Joined: Mon Sep 18, 2017 11:43 pm

Re: Any example code for the games master cart?

Postby William Schaub » Thu Nov 02, 2017 4:08 pm

So after much frustration and basically giving up on having anything but the DAC to play with in MAME someone on a facebook thread on the games master mentioned that you have to turn off the becker port support in MAME in order to hear anything. I tried this out just now and it works!

Code: Select all
    ORG $0E00
START   NOP
;simon's preamble
         ORCC #$50 enable interrrupts?
         LDA #$02 setup MPI slot 3?
         STA $FF7F
;setup multiplexer for audio output on cartridge
        LDA #52
        STA $FF01
        LDA #63
        STA $FF03
        LDA #60
        STA $FF23

        LEAX REGS,PCR
!       LDA ,X+
hlt     BEQ hlt
        STA $FF41
        NOP
        NOP
        NOP
        NOP
        BRA <
REGS    FCB $84,$27,$90,$00
        END START


Should just give you a constant tone. add as many valid commands as you want to the REGS FCB and bob's your uncle.
William Schaub
 
Posts: 8
Joined: Mon Oct 16, 2017 9:08 pm

Re: Any example code for the games master cart?

Postby nowhereman999 » Thu Nov 02, 2017 7:30 pm

Hi William,

I'm glad you figured out the problem and noted it here for others in the future. Good work! At some point I'll probably do a blog post about using the GMC and I'll try to remember that option setting.

If I do a blog post I'll post a link in this forum to it.

Cheers,
Glen
nowhereman999
 
Posts: 33
Joined: Mon Sep 18, 2017 11:43 pm

Re: Any example code for the games master cart?

Postby Bosco » Fri Nov 03, 2017 5:08 am

Thanks for sharing William. :)

I'm really liking this ASM dedicated section of the forum. :D :D
Bosco
 
Posts: 17
Joined: Tue Oct 17, 2017 1:23 pm

Re: Any example code for the games master cart?

Postby nowhereman999 » Sat Nov 04, 2017 11:57 am

Bosco wrote:I'm really liking this ASM dedicated section of the forum. :D :D


Yeah me too... :)
nowhereman999
 
Posts: 33
Joined: Mon Sep 18, 2017 11:43 pm

Previous

Return to Assembly

Who is online

Users browsing this forum: No registered users and 1 guest

cron