Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
  You are not logged in 
C128 Basic Digi Player   [2020]

C128 Basic Digi Player Released by :
Wil

Release Date :
20 June 2020

Type :
C128 Release

Released At :
Commodore-Treffen Graz $31

User rating:awaiting 5 votes (5 left)

Credits :
Code .... Wil of Vintage Computing Carinthia

Download :
http://csdb.dk/getinternalfile.php/200623/c128digi.d64 (downloads: 80)

Look for downloads on external sites:
 Pokefinder.org


User Comment
Submitted by wil on 22 June 2020
Technically, I wouldn't even call it a hack - after all the PLAY command was designed to instrument the SID and the volume change is built-in as intended. That the volume possibilities are reduced from 16 to 10 values is a pity though.
User Comment
Submitted by wil on 22 June 2020
Thanks for the interest, here is my summary of how it works: The PLAY command of Commodore Basic V7.0 has a change volume tag: Ux where x is the volume between 0 and 9. The mapping is done by the routines in the ROM using a table at address F703C. Values are 00 01 03 05 07 08 0a 0c 0e 0f - thus Play volume 0 is mapped to SID volume 00. Note the gaps at some of the values. Luckily, the Volume command prefix "U" is optional, so you can also set differen volumes subsequently with PLAY "1234567890...". PLAY also accepts a string, so with PLAY A$, up to 255 volumes can be played. The playing frequency in FAST mode (2 MHz) is a bit over 6 kHZ. Thus, a very simple digi player can be done in BASIC by storing the volume values (between 0 and 9) in a string array and by having a loop FAST:FORI=0TON:PLAYA$(I):NEXT:SLOW. There is a short pause after each PLAY but - at least to - that's not audible.
User Comment
Submitted by Krill on 22 June 2020
I kindly asked for a summary of how the BASIC hack works, i.e., what the core or your program does to use the PLAY command for replaying samples. Please do not refer to the video once again. :)
User Comment
Submitted by wil on 22 June 2020
Yes, it was "8-Bit show and tell", I wrote it wrongly in my comment, but the credits in the commented source code are correct.

@Krill: i have listed the steps how a recording is to converted in the program under menu point 8.

The program itself does nothing magical, what goes beyond the method described by the 8-Bit Show and Tell video is that I adjusted the quantification, since the C128 Play volume has unregular mapping to SID volumen.
User Comment
Submitted by Adam on 22 June 2020
Quote:
8-bit-guys video on "C128 BASIC Hack: Playing Digital Samples"

No, the video was made by the youtuber/channel called "8-Bit Show And Tell".

C128 BASIC Hack: Playing Digital Samples
User Comment
Submitted by Krill on 22 June 2020
Interesting stuff.

'The program was inspired by the 8-bit-guys video on "C128 BASIC Hack: Playing Digital Samples".'

Care to write a little summary of how it's done?

I tried to find info on it after Martinland mentioned this technique on IRC (with some moderate success and educated guesses filling in the gaps), but i hate skipping through commercially-exploited videos for information that fits on a single printed page. =)
User Comment
Submitted by wil on 22 June 2020
Run the program and see menu point 8 for instructions of how to prepare RAW files with your own recordings.
User Comment
Submitted by wil on 22 June 2020
The program does the conversion between an 8-bit raw sample and the target format the can be played in BASIC. To stay true to the pure BASIC idea, also the conversion is in BASIC, which makes it rather slow. However you can save and load converted files, thus avoiding a conversion. Therefore, a new format, "Basic Digital Sample" is introduced, which contains the digi encoded in ASCII-characters from 0 to 9. While BASIC strings can contain up to 255 characters, the lines in a BDS file are shorter than 88 characters so that a BASIC program can read them with the INPUT# command. Furthermore, three consecutive lines always fit into one string.
User Comment
Submitted by wil on 22 June 2020
This program plays digis on the C128 with the use of any custom assembler routines. The program was inspired by the 8-bit-guys video on "C128 BASIC Hack: Playing Digital Samples". On the C128, it is possible to play a digi using the PLAY command of BASIC 7.0. However, the digi needs to be converted to a sample rate of 6kHz and each sample must be a value between 0 and 9, which is mapped to a volume value between 0 and 15 by the play command. While both, the playback frequency and the resolution are worse than standard digi players in assembler, it is still an interesting hack showing what can be done in BASIC V7.0.
Search CSDb
Advanced
Navigate
Prev - Random - Next
Detailed Info
· Summaries
· User Comments (9)
· Production Notes
Fun Stuff
· Goofs
· Hidden Parts
· Trivia
Forum
· Discuss this release
Sponsored links
Support CSDb
Help keep CSDb running:



Funding status:




About this site:
CSDb (Commodore 64 Scene Database) is a website which goal is to gather as much information and material about the scene around the commodore 64 computer - the worlds most popular home computer throughout time. Here you can find almost anything which was ever made for the commodore 64, and more is being added every day. As this website is scene related, you can mostly find demos, music and graphics made by the people who made the scene (the sceners), but you can also find a lot of the old classic games here. Try out the search box in the top right corner, or check out the CSDb main page for the latest additions.
Home - Disclaimer
Copyright © No Name 2001-2020
Page generated in: 0.086 sec.