News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Dave Rogers' Amstrad Chiptunes emulated on PICO-8

Started by carlc27843, 09:01, 06 June 21

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

carlc27843

Here's a PICO-8 cart that uses the undocumented 5512Hz 8-bit mono PCM channel to emulate the AY-3-8910 sound chip from the Amstrad CPC.


https://carlc27843.itch.io/amstrad-chiptunes-1


It contains classic chiptunes that were either composed or converted to CPC by Dave Rogers:


       
  • Netherworld
  • Zynaps
  • Uridium
  • Cybernoid
  • Cybernoid 2: The Revenge
  • Nebulus
  • Marauder
  • Stormlord
  • Stormlord 2: Deliverance
  • Anarchy
  • Battle Valley
  • Herobotix
  • Turbo Boat Simulator
  • Bear-A-Grudge (ok this was Speccy only never on CPC, but it was one of Dave's favorites so had to be included)
As a long-time fan of many of these songs I thought the waveform visualization was a neat way to experience them with a new perspective.





The cart implements a superset of the sound drivers used in the games, each one disassembled to Z80 and reverse engineered and generalized to a common lua driver. The music data was converted to a common bytecode format.


Although of course these sound much better on a real CPC, the PICO-8 conversion did get Dave's seal of approval.  ;)  Hope you enjoy!




TotO

Really nice work and design around this audio player tribute! :)

Now, I do not really understand what is an "undocumented feature" into a virtual machine.
Does the PCM is the result of the 4-CH mixer to produce the final mono analog sound (DAC) of the Pico-8?
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Targhan

Really cool stuff :). Sound dirty but I like it! The EQ is really cool. Ohh, Ingame-marauder is missing! It cannot be, it's one of his best song!! :).
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime


Targhan

Very true. I still prefer the CPC song :).
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

carlc27843

Quote from: TotO on 09:36, 06 June 21
Really nice work and design around this audio player tribute! :)

Now, I do not really understand what is an "undocumented feature" into a virtual machine.
Does the PCM is the result of the 4-CH mixer to produce the final mono analog sound (DAC) of the Pico-8?


Hi TotO, PICO-8 has a publicly published API, but the author also snuck in several features without telling anyone. One feature was this extra channel that allows limited PCM-sample-based output (in addition to the documented 4 tone-based music/sfx channels). To find these secret features the community has to reverse engineer the PICO-8 binary itself. It's a fun way to recreate that feeling from the 80's where games got more sophisticated as the programmers learned more about the limits of the hardware.


It turns out that PICO-8's virtual CPU was also just powerful enough to emulate the Amstrad's PSG, drive the PSG registers with this higher level music driver and show the waveform visualization.


Interestingly PICO-8 also has an undocumented 128x256x32 color 2:1 widepixel graphics mode (only the 128x128x16 color square pixel mode is documented) which is similar enough to the CPC's mode 0 to allow some nostalgic game ports! There's also an undocumented 256x256x16 color mode so those mode 1 games don't feel left out.  :)


TotO

OK, thank you for the explanation. But... What about the PICO-8 handled devices released around 5 years ago?
Does they support the undocumented features or only the PC virtual machine is compatible?


I have always loved the PICO-8 concept.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

carlc27843

That's a great question. I don't know the earliest PICO-8 version that this undocumented PCM channel was added to. However it's definitely in the latest version and binaries are supplied for Windows, Linux, OSX and Raspberry Pi. I've never run PICO-8 on a handheld but it looks like there are lots of options. Some of them run on Raspberry Pi's - those would be the best bet for compatibility with all the latest features.


(There was an ARM version released many many years ago. I think the PocketCHIP uses it. I would not count on that one supporting the channel)

norecess464

#8
All songs in the compilation are amazing. :thumbup:

Interesting proposed variations of the AY ;-)
I like the sound it generates, even if it sounds different from the real machine.

Stormlord with the "broken sound" near the end of the song just before looping back to the main theme is a great sound experience  :)
My personal website: https://norecess.cpcscene.net
My current project is Sonic GX, a remake of Sonic the Hedgehog for the awesome Amstrad GX-4000 game console!

TotO

Quote from: carlc27843 on 20:51, 07 June 21
I don't know the earliest PICO-8 version that this undocumented PCM channel was added to. However it's definitely in the latest version and binaries are supplied for Windows, Linux, OSX and Raspberry Pi.
I'm asking that because I was thinking if it is more hidden improvements (like the second palette, ...) than hidden features from the begin.

Anyway, nice done!  :)
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Powered by SMFPacks Menu Editor Mod