[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Conversion of Spectrum 128 music to Mockingboard



I'd be more than happy to test this out if you want to send me disk images or post them somewhere. I'd also be interested in the python scripts.

kevin


TomCh wrote:
re. BLuRry's posting in "8 bit 3-d game"
"http://www.brendandy.com/apple/demo disk.zip"
Fire-up AppleWin & BRUN CYBERNOID

My motivation was to really push the MAME AY8910 emu code, as the Apple
Mockingboard music (Skyfox, Ultima) wasn't really exercising it that
hard.

So as a little R&D proj, I thought I'd convert Dave Rogers' Spectrum
128 Cybernoid routine (written in 1988).

Here's a summary of how I did it:
.. I got cybernoid.ay from
http://www.worldofspectrum.org/projectay/gdmusic.htm
.. Split it into bin's with AYSplitR
.. Disassembled with Inkland's dz80w (www.inkland.org)
.. I wrote 6502 macros to replace the z80 opcodes
.. For cybernoid, I hand converted the z80 code to 6502 (using the
macros)
.. I added a few extension to AppleWin's debugger to help debug the 6502
code (ACME symbol loading & ZP pointer support).

I use Skyfox's MB detection routine.

The Z80 regs are emulated with zero-page memory locations $F0..$F8
The playback routine is very inefficient, as it:
.. saves the ZP memory
.. restores the Z80 regs
.. runs the IRQ handler
.. saves the Z80 regs
.. restores the ZP memory

This allows playback to work simultaneously with Applesoft & ProDOS. If
DOS3.3 doesn't disable IRQs around disk I/O, then it won't work on a
real Apple (under DOS3.3), but it'll still work on an emulator :-)

I profiled the IRQ handler and IIRC, it takes about 20% of the frame on
average. This is poor, but the code can easily be optimised. Remember
this was really just a proof of concept.

After this, I wrote a python script to do the Z80->6502, and quickly
converted Cybernoid-II. Problem is this has a section of music that
doesn't sound quite right. It's one of 3 things:
1) AY8910 emulation
2) Subtle difference between Mockingboard & Spectrum's AY8910 interface
(eg. timing)
3) Bug in my converted code :)

I can't eliminate (2), as my Apple is currently knacked. Any one with
real Apple & Mockingboard h/w prepared to test this for me?

Tom