Jump to content
  • entries
    657
  • comments
    2,692
  • views
    898,564

Blast Off!


SpiceWare

1,884 views

Per Wiki there's 5 phrases that can be said:

  • "Blast off!" (start of a round)
  • "Alert! Alert!" (enemies approaching)
  • "Battle stations!" (formation attack)
  • "Spy ship sighted!" (Spy ship advancing)
  • "Condition red!" (enemy attacks become more aggressive; occurs when the player takes too long to clear a round, or misses the spy ship)

Preliminary samples are in place, and currently take up 7107 bytes of ROM. Ironically "Alert! Alert!" takes up the most space:

1979 alertalert.pds1335 battlestations.pds1070 blastoff.pds1240 conditionred.pds1383 spyship.pds



So I should be able to save quite a bit of space by adding logic to say "Alert!" twice :)


Menu - Left Difficulty controls display of (A) diagnostic values of SYSTEM and TIMER, or (B) START
blogentry-3056-0-66783500-1493939200.png

A random sample will be played on the game screen (still showing a rainbow)
blogentry-3056-0-51745700-1493939204.png

For Harmony on a 2600 or Stella-5.0.0-pre7 or newer.
draconian_20170504.bin

 

Test builds for 7800:
drac_7800test5.bin
drac_7800test6.bin

  • Like 5

14 Comments


Recommended Comments

:lolblue:

 

No, it's Alex. I have a samples directory with some programs and script files in it. I create subdirectories in it for any voice I wish to try, such as Alex, Fiona, Tom, Victoria, etc. One script issues these say commands for each directory to create 8 bit samples at 4000 kHz:

say -r $rate -v $voice --data-format=UI8@4000 -o blastoff.wav "Blast off!"
say -r $rate -v $voice --data-format=UI8@4000 -o alert.wav "Alert! Alert!"
say -r $rate -v $voice --data-format=UI8@4000 -o battlestations.wav "Battle stations!"
say -r $rate -v $voice --data-format=UI8@4000 -o spyship.wav "Spy ship sighted!"
say -r $rate -v $voice --data-format=UI8@4000 -o conditionred.wav "Condition red!"

I then use another script to run sox to extract the raw audio from the wav, then run a custom program I wrote to convert the 8 bit samples into 4 bit samples that are then packed 2 to a byte. The packed samples are what CDF plays back.

Link to comment

Speaking of using understandable speech on the Atari 2600, roland p told me about Voder years ago:

youtube.com/watch?v=0rAyrmm7vv0
http://www.youtube.com/watch?v=0rAyrmm7vv0

youtube.com/watch?v=5hyI_dM5cGo
http://www.youtube.com/watch?v=5hyI_dM5cGo

I bet someone with a big brain could figure out how to produce phonemes by only fiddling with AUDVx, AUDCx, and AUDFx, since some tone frequencies almost sound like a human voice already. For example, you can make a T sound using tone 8, starting at frequency 31 and flipping over to zero and maybe ending at 1, 2, or 3:

www.randomterrain.com/atari-2600-memories-program-tone-toy-2008.html

I've been hoping that instead of using digitized speech or an external speech synthesizer, we could track down or bring out the phonemes that already exist inside of the Atari 2600. We could have a collection of phonemes that programmers could play in a sequence to make words or maybe even sing. Programmers would no longer have to waste space on digitized speech or hope that players have an external speech synthesizer. The amount of space needed for Voder-like phoneme data should be much smaller than what is needed for digitized speech.

I've tried to find phonemes by randomly goofing around with Tone Toy 2008, but with no real understanding of phonemes or how sound works on the Atari 2600, it could take a few thousand years. I'm confident that someone who knows about phonemes and Atari 2600 sound could create Voder-like data that programmers can use in their games.

Link to comment

That's pretty slick, though not something I'd be interested in pursuing as I'm not very good at creating sound effects as it is.

Perhaps DINTAR816 would interested in this, he seems to have an excellent grasp on TIA sound :ponder:

  • Like 1
Link to comment

The patent for the Voder shows it's done by passing a pitched buzz or white noise through a set of ten dynamically weighted band pass filters. Not the same as AUDC / AUDF / AUDV.

 

However, it would be interesting to see whether AUDC / AUDF / AUDV could be used to generate phonemes.

  • Like 1
Link to comment

Great news, cd-w created a number of versions of the CDF driver - I tested them out this morning and 2 of them work correctly on my 7800! I've added them to the blog post, I'd be grateful if those of you who have a Harmony & 7800 could test them out on your systems and report back on whether or not they run.

 

We've also been busy working on BUS again. We're updating the BUS Driver to support the new Fast Jump feature as we want to have the BUS and CDF specs finalized when Stella 5.0 is officially released (I believe the target date for that is later this month). Like with CDF, the revised BUS spec is not backward compatible, so besides making the changes in Stella I also need to update my Bus Stuffing Demos for it.

 

I plan to finish that today, then resume work on Draconian later tonight or tomorrow.

Link to comment

Tried the 3 downloads above on my 7800... all display the title screen, plays a random sample, shows the rainbow and then freezes. Can hit select again to return to the title screen and fiddle with the options. But are you supposed to be able to play the game after the sample?

  • Like 1
Link to comment

That's all it does right now, plays a single random sample on the rainbow screen. On the rainbow screen you can hit SELECT for the menu, or even RESET to play another random sample.

 

I don't know if you've been following the blog entries, but this one (and especially the comments) goes over the changes we just did to CDF. It provides us with some major benefits, but made drastic changes to how CDF works thus I'm having to rewrite everything. Some things convert over fairly easily, others take more work. This subroutine was one of the simpler rewrites, originally like this:

ShowTwoColorGraphic:
        sty LoopCounter

S2CGloop:
;---------------------------------------
        sta WSYNC
        dec SLEEP5          ; 5  5
        Lda #<DS_MENU_A      ; 2  7
        sta GRP0            ; 3 10
        lda #<DS_MENU_B      ; 2 12
        sta GRP1            ; 3 15
        lda #<DS_MENU_C      ; 2 17
        sta GRP0            ; 3 20
        ldx DS_MENU_E        ; 4 24  <-- this no longer works
        ldy DS_MENU_F        ; 4 28  <-- this no longer works
        lda #<DS_MENU_COLOR ; 2 30
        sta.w COLUPF        ; 4 34
        lda #<DS_MENU_COLOR ; 2 36
        sta COLUBK          ; 3 39
        lda #<DS_MENU_D      ; 2 41
        sta GRP1            ; 3 44
        stx GRP0            ; 3 47
        sty GRP1            ; 3 50
        sty GRP0            ; 3 53
        ldx #0              ; 2 55
        stx COLUBK          ; 3 58
        stx COLUPF          ; 3 61
        dec LoopCounter     ; 5 66
        bne S2CGloop        ; 3 69      <- OK if page crossed
        stx PF0             ; 3 72
        stx PF1             ; 3 75
;---------------------------------------
        stx GRP0            ; 3 78/2
        stx GRP1            ; 3  5
        stx GRP0            ; 3  8
        rts                 ; 6 14   

it now looks like this:

ShowTwoColorGraphic:
        sty LoopCounter

S2CGloop:
        sta WSYNC
;---------------------------------------
        DIGITAL_AUDIO       ; 5  5
        Lda #<DS_MENU_A     ; 2  7
        sta GRP0            ; 3 10
        lda #<DS_MENU_B     ; 2 12
        sta GRP1            ; 3 15
        lda #<DS_MENU_C     ; 2 17
        sta GRP0            ; 3 20
        lda #DS_MENU_E      ; 2 22 <-- LDX DS_MENU_E changed to this
        tax                 ; 2 24 <--     and this
        lda #DS_MENU_F      ; 2 26 <-- LDY DS_MENU_F changed to this
        tay                 ; 2 28 <--     and this
        lda #<DS_MENU_COLOR ; 2 30
        sta.w COLUPF        ; 4 34
        lda #<DS_MENU_COLOR ; 2 36
        sta COLUBK          ; 3 39
        lda #<DS_MENU_D     ; 2 41
        sta GRP1            ; 3 44
        stx GRP0            ; 3 47
        sty GRP1            ; 3 50
        sty GRP0            ; 3 53
        ldx #0              ; 2 55
        stx COLUBK          ; 3 58
        stx COLUPF          ; 3 61
        dec LoopCounter     ; 5 66
        bne S2CGloop        ; 3 69      <- OK if page crossed
        stx PF0             ; 3 72
        stx PF1             ; 3 75
;---------------------------------------
        stx GRP0            ; 3 78/2
        DIGITAL_AUDIO       ; 5  7        
        stx GRP1            ; 3 10
        stx GRP0            ; 3 13
        rts                 ; 6 19            

the change is because now the only way to read a datastream is via a fast-fetch LDA # instruction. This was done into order to free up space in the driver to add the new Fast Jump feature.

 

Starting tomorrow I'll be rewriting the in-game display kernels. After that I'll have to rewrite the C display sprite and missile routines as the data is stored in a different arrangement (so we can left/right shift missiles & ball for things like displaying the diagonal shots as diagonal lines).

  • Like 2
Link to comment

Hi , I make Bosconian version to Atari XL/XE, how script you use to convert samples to 8-bit with sox ? I use CoolEdit, but maybe with sox quality of samples will be better.

Link to comment

I'm running on a Mac and created my samples using the built in speech routines like this:

say -r $rate -v $voice --data-format=UI8@4000 -o blastoff.wav "Blast off!"
say -r $rate -v $voice --data-format=UI8@4000 -o alert.wav "Alert! Alert!"
say -r $rate -v $voice --data-format=UI8@4000 -o battlestations.wav "Battle stations!"
say -r $rate -v $voice --data-format=UI8@4000 -o spyship.wav "Spy ship sighted!"
say -r $rate -v $voice --data-format=UI8@4000 -o conditionred.wav "Condition red!"

where $voice is Alex, Victoria, etc. and $rate is a number like 290 and denotes words per minute. The larger the number the faster the rate, and smaller the sample.

 

That creates WAV files at 4000 Hz with unsigned 8 bit samples (so values are 0 to 255 instead of signed values of -128 to 127).

 

I then convert those samples to "raw" using sox:

for file in *.wav
do
  root=${file%.*}
  ../sox $file -b 8 -u $root.raw
  ../raw_to_dpc $root.raw $root.pds
done

the sox command outputs a raw file - it only contains the 8 bit samples, there's nothing in the file telling you Hz, sample size, etc.

 

the raw_to_dpc is something I wrote that basically does a divide by 16 on each sample in order to make 4 bit samples (that's all the 2600 can play back) then it packs 2 samples into a single byte.

Link to comment

Thanks for the link! I've downloaded the samples and will see if I can make them work out on the 2600, though I suspect the poor quality of the speech combined with the 2600's audio limitations will make them incomprehensible.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...