Apple II Cybernoid music disk
Go to file
2024-09-30 21:21:29 +01:00
Common Build both Cybernoid2 (for MB) and Cybernoid2.PH (for Phasor) 2024-09-30 21:21:29 +01:00
ConvertZ80 Commit of v5 code 2017-04-21 21:56:00 +01:00
Cybernoid Build both Cybernoid2 (for MB) and Cybernoid2.PH (for Phasor) 2024-09-30 21:21:29 +01:00
Cybernoid2 Build both Cybernoid2 (for MB) and Cybernoid2.PH (for Phasor) 2024-09-30 21:21:29 +01:00
CybernoidTest Cybernoid Test 1 2020-09-20 12:06:07 +01:00
CybernoidTest2 Mask AY_NOISEPER (reg-6) with 0x1F, as Cybernoid reg data has a value of 0x2F, which reads back at 0x0F on real hw 2021-01-17 21:47:04 +00:00
ReleaseDSK Commit of v5 code 2017-04-21 21:56:00 +01:00
README.md Update README.md: Fix links 2017-04-21 22:23:53 +01:00

Cybernoid Music Disk

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 here
  • Split it into bin's with AYSplitR
  • Disassembled with Inkland's dz80w here
  • 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.

Currently playback on real h/w produces noisy renditions of the tunes. I have replaced my AY-register update routine with the slower one used by Skyfox which gives better but not perfect results.

Tom 25 March 2006