Author Topic: Dave Rogers' Amstrad Chiptunes emulated on PICO-8  (Read 906 times)

0 Members and 1 Guest are viewing this topic.

Offline carlc27843

  • CPC464
  • **
  • Posts: 3
  • Country: us
    • Awards
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!



like
0
No reactions

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 4.055
  • Country: fr
    • ?area=showdonations;u=4
    • Awards
Re: Dave Rogers' Amstrad Chiptunes emulated on PICO-8
« Reply #1 on: 11: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?
like
0
No reactions
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.426
  • Country: fr
    • Awards
Re: Dave Rogers' Amstrad Chiptunes emulated on PICO-8
« Reply #2 on: 16:25, 06 June 21 »
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!! :).
like
0
No reactions
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

Offline m_dr_m

  • 464 Plus
  • *****
  • Posts: 325
  • Country: gb
  • http://orgams.wikidot.com/
    • OrgaMS!
    • Awards
like
0
No reactions

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.426
  • Country: fr
    • Awards
Re: Dave Rogers' Amstrad Chiptunes emulated on PICO-8
« Reply #4 on: 17:43, 06 June 21 »
Very true. I still prefer the CPC song :).
like
0
No reactions
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

Offline carlc27843

  • CPC464
  • **
  • Posts: 3
  • Country: us
    • Awards
Re: Dave Rogers' Amstrad Chiptunes emulated on PICO-8
« Reply #5 on: 19:47, 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.  :)

like
0
No reactions

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 4.055
  • Country: fr
    • ?area=showdonations;u=4
    • Awards
Re: Dave Rogers' Amstrad Chiptunes emulated on PICO-8
« Reply #6 on: 14:13, 07 June 21 »
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.
like
0
No reactions
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline carlc27843

  • CPC464
  • **
  • Posts: 3
  • Country: us
    • Awards
Re: Dave Rogers' Amstrad Chiptunes emulated on PICO-8
« Reply #7 on: 22:51, 07 June 21 »
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)
like
0
No reactions

Offline norecess

  • CPC6128
  • ****
  • Posts: 272
  • Country: ca
    • Awards
Re: Dave Rogers' Amstrad Chiptunes emulated on PICO-8
« Reply #8 on: 22:56, 07 June 21 »
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  :)
« Last Edit: 23:02, 07 June 21 by norecess »
like
0
No reactions

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 4.055
  • Country: fr
    • ?area=showdonations;u=4
    • Awards
Re: Dave Rogers' Amstrad Chiptunes emulated on PICO-8
« Reply #9 on: 23:02, 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!  :)
« Last Edit: 23:06, 07 June 21 by TotO »
like
0
No reactions
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)