Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sound programming standard across Apple II audio peripherals

589 views
Skip to first unread message

anthon...@gmail.com

unread,
Jul 6, 2017, 11:58:07 PM7/6/17
to
For people interested in generating sound effects/music for their games on the Apple II, is there a standard file format for sounds that can be played across the different devices, such as Apple II speaker, Mockingboard, and Ensoniq, and are there libraries out there for playing said standard? That is, similar to the way the same mp3 file is played via a Sound Blaster, RealTek, or any of those other audio chips where mp3 is the standard but the driver implementation varies?

Michael J. Mahon

unread,
Jul 7, 2017, 3:24:43 PM7/7/17
to
No, there isn't.

Perhaps it's because both the sound capabilities and the code to implement
them are radically different across the hardware you mention.

--
-michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com

laserac...@gmail.com

unread,
Jul 7, 2017, 4:25:43 PM7/7/17
to
If you wish to remain with 1bit audio... I have developed the SFX Multi-tasking audio that (although requires 128kb systems) can multi-task along with game code... no interrupts or addition hardware required! If you haven't seen examples of this... these are the best to date...

DogFighters of Mars 2- Upgraded to the Special Edition within the last week! Its quite something, the main game is DOG2 on the main menu, but tons of other audio and special features inside too... multi-tasking 1bit audio at its BEST, arrow keys move, space bar shoots (if available).
https://www.dropbox.com/s/h0yzya36nrue4ho/DOGFIGHTER2%20SPECIAL%20%28r1%29.zip?dl=0

SFX Breakout (Uses Joystick controller). A small game from my friend I converted to SFX audio). Another impressive example of SFX!
https://www.dropbox.com/s/4fkrqb2rxoy38fv/SFX%20Breakout.dsk?dl=0

Future SFX games incoming..
TurdFighter -from William Bonner
RiverRaid - Naspite Labs

Contact me offlist if this seems like something your interested in doing for your games, I'll support you with docs, programs to get audio files into the apple and other general help. I want a ton more SFX audio enhanced games, because they really are something else!

Tom Porter
Naspite Labs



laserac...@gmail.com

unread,
Jul 7, 2017, 4:33:07 PM7/7/17
to
Also on the horizon is something called "SFX2"... but i'm not ready to announce that yet...

Tom Porter
Naspite Labs

James Davis

unread,
Jul 7, 2017, 4:43:25 PM7/7/17
to
On Thursday, July 6, 2017 at 8:58:07 PM UTC-7, anthon...@gmail.com wrote:
> For people interested in generating sound effects/music for their games on the Apple II, is there a standard file format for sounds that can be played across the different devices, such as Apple II speaker, Mockingboard, and Ensoniq, and are there libraries out there for playing said standard? That is, similar to the way the same mp3 file is played via a Sound Blaster, RealTek, or any of those other audio chips where mp3 is the standard but the driver implementation varies?

If you are really interested in Apple II sound technology, you should read some of the sound articles (pun intended) on MJM's website:

http://michaeljmahon.com

James Davis

anthon...@gmail.com

unread,
Jul 7, 2017, 7:03:21 PM7/7/17
to
Yes, I just went through your link... Michael is quite the busy bee, and hardcore to boot! I could use a brain dump from him...

anthon...@gmail.com

unread,
Jul 7, 2017, 7:54:01 PM7/7/17
to
On Friday, July 7, 2017 at 3:24:43 PM UTC-4, mjm...@aol.com wrote:
Hey Michael,

I see you have some Apple II sound experience under your belt (I *really* want to check out your sound programs such as the synth!) and you're pretty hardcore based on your other projects (so you're the one behind the Apple crates!) so I'm taken aback by your reply; surely the sky is no limit for one as capable as you! For example, there are countless numbers of video cards of varying capabilities for the PC, each one with their own driver implementation, and yet Windows provides a level of abstraction and common interface that enables us to communicate with these devices. Surely we can do the same with the Apple II speaker, Mockingboard, Ensoniq, and others, no? So long as there's some common file formats (ie. wav, mp3, or something more suited for 8/16 bit machines) and an api we should be good to go I would think. For those devices that don't support some capabilities it's no big deal because the implementation will simply ignore it or compensate. For example, the speaker isn't asynchronous? That's okay, as a developer you make an api call in advance to see whether the device is async or not and in the case of the speaker implementation it will come back false and you now have some options :

1) no background music possible so sound-effects mode only and music only during loading screens

or

2) load in an alternative module of main code that's specially crafted a-la-BilesToad to play music in the background. Naspite Labs SFX seems to be doing the BilesToad thing (no interrupts!) which is pretty impressive; I wanna know whether it's the same idea and if not, how they did it!

Ensoniq is a sampling synthesizer? No problem, the Ensoniq implementation will init the chip in advance with auto-generated samples that will play the required tones as required by the api...

or whatever we want to do, depends on what we allow via the api.

Do I hear a yea or a nay?

anthon...@gmail.com

unread,
Jul 7, 2017, 7:59:50 PM7/7/17
to
Tom! I just saw your YouTube video demo... What manner of sorcery is this? Are you specially crafting your main loop and game logic cycles to work in perfect unison with the sound generator a-la-BilesToad or have you sold your soul to the devil? You must confess your secrets and allow us access to your palantir!

laserac...@gmail.com

unread,
Jul 7, 2017, 8:01:48 PM7/7/17
to
Look for the links I provided above for those two games... play them, then contact me back... yes it is sorcery!

laserac...@gmail.com

unread,
Jul 8, 2017, 2:44:10 PM7/8/17
to
One of the secrets, is something most people wont think about. 1bit audio is highly criticized as being definitely lo-fi. This creates popping and hissing, even if its recorded and processed with maximum clarity. My method has no cycle counting or anything of the sort (I don't even know what BilesToad technology is). The greatest weakness of 1bit audio also with short gaps doing game code inbetween the 'time slices' of the audio, creates pops and hisses. In single tone generation, this is very destructive but with recorded media, its almost indistinguishable if you can keep the frequency of calling audio high. 1bit audio's greatest weakness turns out to be one of SFX's greatest strengths! There is also a lot of little 'tricks' going on under the hood.... but now its a full library that, if the programmer is slightly careful and follows only a few simple rules, you too can have SFX audio inside your games. I am willing to share the tricks/software/whathaveyou with people serious in using it for their own projects.

Michael Pohoreski

unread,
Jul 8, 2017, 2:49:36 PM7/8/17
to
On Saturday, July 8, 2017 at 11:44:10 AM UTC-7, laserac...@gmail.com wrote:
> 1bit audio is highly criticized as being definitely lo-fi.

Depends who you talk to and what frequency you run it.

Sony doesn't think so since they used it for their Super Audio CDs @ 2.8224 MHz.

https://en.wikipedia.org/wiki/Direct_Stream_Digital
https://en.wikipedia.org/wiki/Super_Audio_CD

Message has been deleted

laserac...@gmail.com

unread,
Jul 9, 2017, 9:08:28 AM7/9/17
to
Your comparing 140kb floppy disks to a CD... that's ridiculous... there's more power in a $15 dollar modern cd player than an Apple II with all the slots filled... 2 minutes of audio plus game code per side of a floppy is pretty darn good...

Michael Pohoreski

unread,
Jul 9, 2017, 9:34:54 AM7/9/17
to
On Sunday, July 9, 2017 at 6:08:28 AM UTC-7, laserac...@gmail.com wrote:
> Your comparing 140kb floppy disks to a CD... that's ridiculous... there's more power in a $15 dollar modern cd player than an Apple II with all the slots filled... 2 minutes of audio plus game code per side of a floppy is pretty darn good...

Of course 2 minutes audio on a 140 KB disk is great! No one is debating _that._

However, I think you are _completely_ missing the point -- the topic is about **1-bit audio and its (perceived) quality (or lack of it.).**

i.e. I was responding to your point about "1bit audio is highly criticized as being definitely lo-fi."

The counter-argument to _that_ is that it depends on the sampling rate. At a high enough **sampling rate** there is almost no difference in quality from CD's.

The question therefore remains: At what low rates is 1-bit audio good enough? I don't know the answer to that.

Keep in mind that 1-bit audio is nothing new. It was done back in:

* 1981's Castle Wolfenstein -- https://en.wikipedia.org/wiki/Castle_Wolfenstein
* 1982's Sea Dragon -- https://en.wikipedia.org/wiki/Sea_Dragon_(video_game)

The first time I heard them I had to listen a few times to make out the voice. Note that voice can be sampled at a much lower rate then music. I.e. telephones used to sample voice at 8 Khz @ 8-bit.

https://dsp.stackexchange.com/questions/22107/why-is-telephone-audio-sampled-at-8-khz

If you are using 1-bit audio for SFX then you most certainly can get away with an extremely low sampling rate.

Personally, I'm not a fan of 1-bit audio -- it strains the ears (& brain) just a tad too much.

But the concept is cool.

And the fact that you have a SFX Multi-tasking system is definitely neat!

As to the quality? That's debatable but we have to keep in mind that getting anything out of the Apple's "squeaker" is a "miracle." :-)

Understand my point now?

laserac...@gmail.com

unread,
Jul 9, 2017, 11:28:42 AM7/9/17
to
Been working hard on this, audio compression in general and my new SFX2 which should at least be available in demo form by end of summer.. it will really make great audio without the overhead of lots of data.

This is about the best compression that can be achieved (I think anyway)... the quality isn't the highest but that wasn't the point of this test. Pirates of the Caribbean loop... 54 seconds, takes 86 sectors (aka 21.5kb), or only 15% of the disk. I guess sample rate is close to .40kb per second.

I cant guarantee speed accurate on a gs... https://www.dropbox.com/s/zymrlfobvzsqkui/REC%20TEST.DSK?dl=0

Michael Pohoreski

unread,
Jul 9, 2017, 2:08:15 PM7/9/17
to
On Sunday, July 9, 2017 at 8:28:42 AM UTC-7, laserac...@gmail.com wrote:

> Pirates of the Caribbean

Wow, I'm impressed. I wasn't expecting quality that high! Nice job!


CALL-151
0300:A2 00 8E 25 03 A0 14 8C
0308:26 03 D0 18 A0 08 48 A9
0310:08 20 A8 FC 68 0A EA 90
0318:05 8D 30 C0 B0 00 EA EA
0320:EA 88 D0 EA BD 1A DA E8
0328:D0 E2 EE 26 03 AD 26 03
0330:C9 6A D0 D8 60
BLOAD PIRATE SONG.VOC,A$1400
300G

Disassembly of the player in case anyone is curious ...

- - -8< Secret Sauce - - -

; 1-bit audio playback

Speaker = $C030
WAIT = $FCA8

ORG $300

Main
LDX #0
STX GetNote+1 ; *** SELF-MODIFYING
LDY #$14
STY GetNote+2 ; *** SELF-MODIFYING
BNE GetNote
SamePage
LDY #8 ; BitsPerByte
SameByte
PHA
LDA #8 ; Delay, Default=4
JSR WAIT
PLA
ASL
NOP
BCC Delay
STA Speaker
BCS Delay
Delay
NOP
NOP
NOP
DEY
BNE SameByte
GetNote
LDA $DA1A,X ; *** SELF-MODIFIED!
INX
BNE SamePage
INC GetNote+2
LDA GetNote+2
CMP #$6A ; End of File, Default=#$96
BNE SamePage
RTS


laserac...@gmail.com

unread,
Jul 9, 2017, 7:28:16 PM7/9/17
to
This code is almost the exact same as a Computer magazine article in 1986... but the SFX that is based off this is vastly different (for obvious reasons). The special thing about this is the recording method to use the 2nd lowest available bitrate this code can handle (under normal circumstances you really cant use value speed 8, as its far too few bits per second. Its a highly crafted combination of equalizer and volume settings. In normal day to day operations I tend to use value speed 5, along with the equalizer we get some pretty impressive quality music for the data spent.... as shown with DogFighters of Mars 2 (main game).

I have worked on trying to get 1bit PC WAV files into the apple unsuccessfully... and must currently record everything on the back of a IIE. If we can make some sort of converter that the apple can read (and have the same low bit rates), I think quality can improve almost 100% from what has been achieved so far. I am not knowledgeable enough about WAV or how non-apple stuff works, so I am unable to do it. Michael M the sound genius has done it, but his bitrates are very high. His main focus on his work was quality at any cost... and he did it, but his 'released' program did something like 2.5 seconds... im sure he has prototype stuff on his drive somewhere that can do far better lengths.

SFX2 in the works takes a recorded instrument scale (possibly upto 3 instruments), incorporates it with a midi-converter and the output can have an entire song with a sound font footprint of 2k an instrument, plus the midi/note data. It again wont have the 'quality' of Mahon's stuff, but the focus is to create a multi-tasking mockingboard audio experience with game code running in the background. It will suffice for those without expansion hardware!


Michael Pohoreski

unread,
Jul 9, 2017, 7:50:54 PM7/9/17
to
On Sunday, July 9, 2017 at 4:28:16 PM UTC-7, laserac...@gmail.com wrote:
> I am not knowledgeable enough about WAV or how non-apple stuff works,

WAV files are pretty easy to parse / process.
i.e.
http://soundfile.sapp.org/doc/WaveFormat/

Usually they are in PCM format which means uncompressed:

* 8-bit samples are stored as unsigned bytes, ranging from 0 to 255.
* 16-bit samples are stored as 2's-complement signed integers, ranging from -32768 to 32767.


> so I am unable to do it. Michael M the sound genius has done it, but his bitrates are very high.

I believe that is the main criticism of 1-bit audio -- you need a "high" (*) bit rate to get anything of decent quality (*)

(*) Where high and quality are subjective.

qkumba

unread,
Jul 12, 2017, 1:12:16 PM7/12/17
to
> Delay
> NOP
> NOP
> NOP

It looks like this could be reduced by one byte, by replacing with CMP ($00,X) instead.

Anthony Ortiz

unread,
Jul 12, 2017, 1:31:24 PM7/12/17
to
Who cares about a single byte when you have a whole 64K of RAM??!!!

laserac...@gmail.com

unread,
Jul 12, 2017, 3:43:22 PM7/12/17
to
I never messed with the core.... I think the NOP is more of a delay, but its possible it was a patch way back in 1986... the music may play a little faster with them removed...

Michael J. Mahon

unread,
Jul 12, 2017, 3:44:32 PM7/12/17
to
It also fails to equalize cycles for both cases, which results in
additional noise.

It looks like someone was trying to "trim" the loop period, but kind of
missed the point.

This is a typical, not-well-engineered example of the simple code to
playback sound "recorded" to 1-bit precision through the cassette input
port.

It reproduces fuzzed or "infinitely clipped" sound, which is OK for some
purposes, but pretty raucous for most purposes. It was used because for
many years it was thought to be "the only game in town" for Apple II's
without hardware assistance.

I used it in my early "HEX DUMP READER" published on my website.

It was my dissatisfaction with simple 1-bit audio that motivated me to
write a 5-bit software DAC (playing through the standard 1-bit speaker)
running at a pulse rate of 11kHz, followed by a 5-bit player running at
22kHz (but still at an 11kHz sample rate).

The double-frequency DAC pulse rate greatly reduces the requirement to
provide a low-pass (reconstruction) filter, since the speaker itself and
many human ears provide sufficient filtering. ;-)

For the AppleCrate synthesizer, I provided an audio processing/amplifying
channel that has stereo 5-pole filters which essentially eliminate the
22kHz pulse tone, and would probably allow going to a 6-bit software DAC
running at a pulse rate of 11kHz.

laserac...@gmail.com

unread,
Jul 12, 2017, 4:09:00 PM7/12/17
to
You are unquestionably the audio guru, however as I see it its impossible to have 'perfect' audio and multi-tasking a full playing game without hisses and pops of any sort, even if the code truly was balanced on its clock cycles. I do a 'good enough' approach by using equalizers to create the maximum clarity with the audio and then the pops do show up, but without pure tones it actually is masked fairly well, unlike beep or 'pure instrument' music. My game code is not sync'ed nor is it cycle counted... heck, half the game is 'compiled applesoft!' The good enough approach still is about the best that has ever been made, even if you compare it to 'Moon Patrol', Dogfighter2 blows the doors off it.

Anthony Ortiz

unread,
Jul 12, 2017, 4:25:30 PM7/12/17
to
On Wednesday, July 12, 2017 at 3:44:32 PM UTC-4, mjm...@aol.com wrote:
For all you laymen that need this translated to plain and simple English that we can all understand, he's simply stating the obvious : when the Heisenberg magnaspanners collapse you need to realign the nuclear density synthesizer to correlate with the metatronic microfilament dish's perpetual resonance by utilizing a bipolar shifter damping field with multiadaptive seeker gravitic subspace duotronics. This is, of course, par for the course and you will probably wonder "what's the big deal mjm?" but if you tweak the Dermatiraelian sensor net ever so slightly with Michael's patent pending psilosynine transwarp field coils and thoron neurotransmitters your ears will literally piss in their cavities; *that's* how good 5-bit sound is.

Antoine Vignau

unread,
Jul 12, 2017, 4:26:33 PM7/12/17
to
Force 7 by Kyle Freeman, published by Datasoft, is a great example of sound while playing, cycle counting at its best!

laserac...@gmail.com

unread,
Jul 12, 2017, 4:37:54 PM7/12/17
to
Your right, Force 7 isn't too bad for synth. I haven't mastered 4 way scrolling with a whole map in memory yet... (only 2 way). And for Anthony, MjM's explanation was a little bit more intelligible....

laserac...@gmail.com

unread,
Jul 12, 2017, 4:40:46 PM7/12/17
to
How many floppy disks would 5bit audio take to make a game... that's another factor to consider to. Its a trade off, good audio, or disk space. Alright, I be quiet now...

Michael J. Mahon

unread,
Jul 12, 2017, 7:13:04 PM7/12/17
to
Of course.

I'm not proposing that you adopt a software DAC approach, which requires
multiple bits per sample.

However, your playback routine can easily be made to have constant loop
times for "toggle" and "no toggle".

It's a small improvement, but it's easy.

BTW, if instead of continuous playback you are synthesizing musical notes,
then very little additional space is required. For example, a typical
instrument voice is about 5-10 pages, and each note (up to six seconds
long) is just three bytes.

qkumba

unread,
Jul 13, 2017, 12:39:00 AM7/13/17
to
> Who cares about a single byte when you have a whole 64K of RAM??!!!

One byte can make all the difference if space is tight.

qkumba

unread,
Jul 13, 2017, 12:40:31 AM7/13/17
to
> I never messed with the core.... I think the NOP is more of a delay, but its possible it was a patch way back in 1986... the music may play a little faster with them removed...

Yes, they exist to consume six cycles. I am suggesting to replace three instructions of one byte and two cycles each in execution, with one instruction of two bytes and six cycles in execution.
It's equivalent in speed, just smaller.

qkumba

unread,
Jul 13, 2017, 12:42:46 AM7/13/17
to
> It looks like someone was trying to "trim" the loop period, but kind of
> missed the point.

More exactly - we have different points of view. Yes, it's a simple playback routine, but if it is sufficient for the purpose, then it becomes the target for optimization.
And yes, the timing is not consistent, especially when crossing a page.

qkumba

unread,
Jul 13, 2017, 12:37:05 PM7/13/17
to
> And yes, the timing is not consistent, especially when crossing a page.

Here's a version with effectively constant timing across all paths, but subject to the fluctuation due to calling $FCA8:

Speaker = $C030
WAIT = $FCA8

ORG $300

Main
LDX #0
STX GetNote+1 ; *** SELF-MODIFYING
LDY #$14
STY GetNote+2 ; *** SELF-MODIFYING
BNE GetNote
SamePage
LDY #8 ; BitsPerByte
SameByte
PHA
LDA #8 ; Delay, Default=4
JSR WAIT
PLA
ASL
NOP
BCC Delay
STA Speaker
BCS Next
Delay
CMP ($00,X)
Next
DEY
BNE SameByte1
GetNote
LDA $DA1A,X ; *** SELF-MODIFIED!
INX
BNE SamePage1
INC GetNote+2
LDA GetNote+2
CMP #$6A ; End of File, Default=#$96
BNE SamePage
RTS

SameByte1
CMP $44,X
CMP ($00,X)
CMP ($00,X)
JMP SameByte

SamePage1
CMP ($00,X)
NOP
JMP SamePage

The tones are slightly lower as a result.

Michael J. Mahon

unread,
Jul 13, 2017, 8:14:56 PM7/13/17
to
So the "recording" routine should also be inspected for equivalent timing.

laserac...@gmail.com

unread,
Jul 15, 2017, 12:46:43 PM7/15/17
to
To be honest I never thought about 'modifying' the player or recording cores, as when I started out doing apple recording I didn't know an LDA from a JSR. I will take all these suggestions to my assembler on Sunday and see if it can be modified to have 'equal clock cycles' in on and off periods and just general improvements. There is a margin inside SFX for the 'playback routine' so modifying that for the 'upgraded' sound shouldn't be a problem... although the rest of it is VERY tight after the GS "correction" speed upgrade.... thank you MJM, Qkumba and the others!

Bill Chatfield

unread,
Aug 15, 2017, 4:22:49 PM8/15/17
to
On Thursday, July 6, 2017 at 11:58:07 PM UTC-4, Anthony Ortiz wrote:
> For people interested in generating sound effects/music for their games on the Apple II, is there a standard file format for sounds that can be played across the different devices, such as Apple II speaker, Mockingboard, and Ensoniq, and are there libraries out there for playing said standard? That is, similar to the way the same mp3 file is played via a Sound Blaster, RealTek, or any of those other audio chips where mp3 is the standard but the driver implementation varies?

Finding ways to make audio with an unmodified Apple II is very cool. But, IMHO, the Mockingboard should be considered the standard. It seems to be the widest supported audio card and modern clones are being developed:

http://www.a2heaven.com/webshop/index.php?rt=product/product&path=72&product_id=133

Maybe a driver could be written to allow the included sound hardware in the IIgs to emulate a Mockingboard. I'm sure someone will correct me if I'm wrong. If not you can always put a Mockingboard clone in a IIgs.

There is a Mockingboard add-on for a IIc:

http://a2central.com/6876/ian-kim-produces-first-internal-mockingboard-for-the-apple-iic/

Getting a Mockingboard for your machine is part of the fun of building up an old machine.

On the other hand, if there are people around who can build Mockingboard clones, maybe they should build a much better (16/32-bit) sound card that is II+,IIe,IIc,IIgs compatible and that is backward compatible with the Mockingboard. I'd pay for that.

Michael Pohoreski

unread,
Dec 19, 2017, 9:14:33 PM12/19/17
to
On Sunday, July 9, 2017 at 8:28:42 AM UTC-7, Tom Porter wrote:
> This is about the best compression that can be achieved (I think anyway)... the quality isn't the highest but that wasn't the point of this test. Pirates of the Caribbean loop... 54 seconds, takes 86 sectors (aka 21.5kb), or only 15% of the disk. I guess sample rate is close to .40kb per second.
>
> I cant guarantee speed accurate on a gs... https://www.dropbox.com/s/zymrlfobvzsqkui/REC%20TEST.DSK?dl=0

Necro'ing ...

I was going to show this to another Apple 2 aficionado but the link is dead. Fortunately, was able to find a saved copy.

Is the original source WAV file available so we test different codecs using an apples-to-apples (pun intended) comparison?

Michael Pohoreski

unread,
Dec 19, 2017, 9:37:07 PM12/19/17
to
On Sunday, July 9, 2017 at 4:28:16 PM UTC-7, Tom Porter wrote:
> This code is almost the exact same as a Computer magazine article in 1986...

Which magazine was this?

Tom Porter

unread,
Dec 20, 2017, 7:46:11 PM12/20/17
to
Here is the original (reprint) of that magazine article...
https://www.atarimagazines.com/compute/issue88/Audio_Recorder_For_Apple_II.php

Or you can use my already refined Audio Recorder v3.12 which is styled after the Windows XP recorder...in a nice shell... allows file editing and speed adjustments ect... includes a badly written manual. Requires 80COL but should work in 64kb mode... also has a disk of audio samples. Its files are 100% compatible with the magazine article above.
https://www.dropbox.com/s/9nvew2q3ckjyzwh/AUDIO%20RECORDER%20v3.12%20%2B%20Instructions.zip?dl=0

Audio Recording/Playback is one thing... but SFX Multi-tasking is a whole other ball game... try these babies out!

R2D3 Chase++ (works on the APPLE II+ and up)
https://www.dropbox.com/s/j5ag1s26rnj0nt3/r2d3%20chase%2B%2B.dsk?dl=0

Snail 2.5 (requires 128kb)
https://www.dropbox.com/s/3zt74w50aqid84j/SNAIL%20sfx2.5.dsk?dl=0

On the heels of DogFighter2, we are also working on another Big Production SFX Game TREX
https://www.youtube.com/watch?v=UOTU35efogE

All these games require no extra hardware...




Michael Pohoreski

unread,
Dec 20, 2017, 8:35:51 PM12/20/17
to
Thanks Tom!

Meta-Info for those interested:

Audio Recorder For Apple II
COMPUTE! ISSUE 88 / SEPTEMBER 1987 / PAGE 86

BSAVE RECORDER.PLAYER,A$300,L$6C

0300: A0 08 8C 28 03 A2 00 8E
0308: 27 03 86 FF A0 08 48 A9
0310: 04 20 A8 FC 18 AD 60 C0
0318: 45 FF 10 05 45 FF 85 FF
0320: 38 68 2A 88 D0 E8 9D 00
0328: 08 E8 D0 E0 EE 28 03 AD
0330: 28 03 C9 96 D0 D6 60 A2
0338: 00 8E 5C 03 A0 08 8C 5D
0340: 03 D0 18 A0 08 48 A9 04
0348: 20 A8 FC 68 0A EA 90 05
0350: 8D 30 C0 B0 00 EA EA EA
0358: 88 D0 EA BD 00 08 E8 D0
0360: E2 EE 5D 03 AD 5D 03 C9
0368: 96 D0 D8 60

To Record @ $300
CALL 768

To Playback @ $337
CALL 823


Data defaults to:
Start: $0800
Ends.: $9600

No source was give. Manual disassembly for RECORDER.PLAYER
(I've documented the player portion previously.)

temp EQU $FF
WAIT EQU $FCA8
TAPEIN EQU $C060
DATA_BEG EQU $0800
DATE_END EQU $9600

ORG $300

LDY #>DATA_BEG
STY Dst+2
LDX #<DATA_BEG
STX Dst+1
STX temp

SamePage
LDY #8
Bits
PHA
LDA #4
JSR WAIT
CLC
LDA TAPEIN
EOR temp
BPL Low
EOR temp
STA temp
SEC
Low
PLA
ROL
DEY
BNE Bits
INX
Dst
STA $0800,X ; **SELF-MODIFIED**
INX
BNE SamePage
INC Dst+2
LDA Dst+2
CMP #>DATE_END
BNE SamePage
RTS

Tom Porter

unread,
Dec 20, 2017, 9:00:54 PM12/20/17
to
When I first found it, I found it confusing to use so I wrote a mini program (dubbed Recorder 1.00) to help me keep everything straight...

1 PRINT CHR$ (4);"PR#3"
10 HOME
11 PRINT " ** RECORDER INSTRUCTIONS... FROM PROMPTS **"
12 PRINT "==============================================================================="
13 PRINT " RECORDER IS LOADED.... BLOAD (MUSIC FILE) IF PLAYBACK DESIRED": PRINT
14 PRINT " RECORD: (CALL 768) PLAY: (CALL 823)": PRINT
16 PRINT " TO CHANGE SIZE/LENGTH OF RECORDING: (DEFAULT 8 & 150):"
17 PRINT " START: (POKE 769,PAGE) END: (POKE 819,PAGE)"
18 PRINT " (POKE 829,PAGE) (POKE 872,PAGE)": PRINT
20 PRINT " TO CHANGE RECORDING QUALITY/SPEED: (DEFAULT IS 4)"
21 PRINT " (POKE 784,X) (1) APX 15 SECONDS"
22 PRINT " (POKE 839,X) (4) APX 40 SECONDS": PRINT
25 PRINT " TO SAVE: TYPE (POKE 43364,255)"
26 PRINT " (BSAVE NAME,A2048,L(PAGES-8)*256"
30 PRINT CHR$ (4);"BLOAD RECORDER.DAT"

craigsl...@gmail.com

unread,
Dec 21, 2017, 2:05:38 AM12/21/17
to
Applevisions book by Bob Bishop has 1bit record/play routine source in it. He also has cassette port networking in p.a.c.k (programmers assembly c.... kit)

Kant remember what ... wait. It's c for Construction

He also did voice recognition through cassette ports.

I started a MIDI file to mockingboard player music. File converter years Ago but never finished. The mockingboard player is interrupt driven So you just load a file and call PLAY. Music plays in the background while you catalog a disk, run a basic program , or a 6502 program

Tom Porter

unread,
Dec 21, 2017, 9:58:10 AM12/21/17
to
Craig... I hate this post to become all about me...
Recently, in the last 6 months I also have come up with a *MID to Mockingboard program called MIDI2MOCK... there are about 70 samples on 4 disks, plus a converter software/instructions ect... good to mess around with.
https://www.dropbox.com/s/z0ldxehkebwbfeg/MIDI%20TO%20MOCK%20VER1.zip?dl=0

It is NOT interrupt driven, work has begun on MIDI2MOCK version 2 that will/does have smaller music files (higher compression) and will be interrupt driven, prototypes are working but have too many apple II projects.
Some sample vids below...
https://www.youtube.com/watch?v=2Lb8JoaVK3s
https://www.youtube.com/watch?v=MmMZxdquiPA

Anyway, do you still have your code/player in a working state, i'd love to see it! -Tom
0 new messages