Jump to content
IGNORED

1088XLD - Custom A8 Computer in 1050 Drive Case


mytek

Recommended Posts

If you want some MIDI events stored in ROM, I suggest taking the first few notes of Pictures At An Exhibition by Mussorgsky :) But to trigger playing it, you would need to parse the incoming MIDI events and react on a SYSEX event. Playing back also involves some way of timing. You can not just dump all the events in burst mode.

 

 

Meanwhile, I updated the CS9236 waveblaster board. Added buffering and AC coupling. If the latter turns out not to be needed, I can just bridge the resistors and drop the capacitors. On to routing! My favorite pastime :)

cs9236-wb.pdf

  • Like 2
Link to comment
Share on other sites

Re my previous post, there's one error in the schematic. The 74HC04 should be a 74LVC04 (SOIC14) and run on 3.3V.

 

edit: still considering the clock. Just reread the CS9236 datasheet and I totally forgot it is 5V tolerant! Back to a 5V canned oscillator and a HC04. I want my first prototype mostly Through Hole (CS4333 is SOIC8). Perhaps later it can be shrunk to the size of DreamBlaster S2 by utilizing SMD.

Edited by ivop
  • Like 1
Link to comment
Share on other sites

Re my previous post, there's one error in the schematic. The 74HC04 should be a 74LVC04 (SOIC14) and run on 3.3V.

 

edit: still considering the clock. Just reread the CS9236 datasheet and I totally forgot it is 5V tolerant! Back to a 5V canned oscillator and a HC04. I want my first prototype mostly Through Hole (CS4333 is SOIC8). Perhaps later it can be shrunk to the size of DreamBlaster S2 by utilizing SMD.

Be carefull about 5V tolerance, after Candle built the first run of the U1MB it was discovered that the CPLD used needed current limiting resistors on two 5V signals from the MMU, in spite of being listed as "5V tolerant".

  • Like 2
Link to comment
Share on other sites

Ivo do you plan on making your Wave Blaster board the same size as the Dream Blaster S2, for a drop-in fit?

 

Edit: I initially missed it, but you mentioned that it would be possible with all SMD, but that your first iteration was to be mostly thru-hole which I assume means it will be a larger footprint.

  • Like 1
Link to comment
Share on other sites

Have you found a cheaper source for the Dream Blaster S2 other than this site?: https://www.serdashop.com/waveblaster

 

No I haven't, and it's kind of pricey for us over here in the US due to shipping. That's why I'm interested in Ivo's project if it can drop-in and replace the S2.

  • Like 1
Link to comment
Share on other sites

Ivo do you plan on making your Wave Blaster board the same size as the Dream Blaster S2, for a drop-in fit?

 

Edit: I initially missed it, but you mentioned that it would be possible with all SMD, but that your first iteration was to be mostly thru-hole which I assume means it will be a larger footprint.

 

Indeed, the first revision will be 5x10cm THT. I even plan on using a ribbon cable to connect to the waveblaster port :)

 

Hopefully, it can be shrunk later on, although the CS9236 PLCC28 is pretty big. Definitely need to drop the socket. There's also a TQFP variant, but that one seems impossible to acquire, plus its dimensions are roughly the same as PLCC28 without a socket. Dropping sockets and going SMD also helps in utilizing both sides of the PCB. No idea if it'll fit on the same size PCB as the DreamBlaster S2.

  • Like 1
Link to comment
Share on other sites

post-20947-0-23594300-1537024597.png

 

Lots of free space, separate analog and digital planes to cater for old hardware, too (i.e. people running soundblasters in their 486ers :))

 

If you compare it to the size of a DreamBlaster, I reckon it'll be quite a challenge to meet the same footprint.

 

Edit: X1 shows a DIP14 chip, but that's a canned crystal oscillator.

Edited by ivop
  • Like 2
Link to comment
Share on other sites

Midi Tune Playback on Power-Up now Implemented.

New Code


;**********************************************************************
;*  Name    : MIDIctrl_PIC12F1572.gcb
;*  Author  : Michael St. Pierre
;*  Notice  : Copyright (c) 2018 Mytek Controls
;*          : All Rights Reserved
;*  Date    : 9/17/2018
;*  Version : 1.0 BETA7
;*  Notes   : MIDI clock, gated MIDI IN & OUT, and Intro Music Player
;*          : for use with Dream Blaster S2 wave table module.
;*          : Based on Microchip PIC12F1572 interfaced to Atari SIO
;*          : Compiled in Great Cow Basic version 0.98.02
;*          : Source: <https://gcbasic/sourceforge.net/>
;*
;*
;*  This program is free software; you can redistribute it and/or modify
;*  it under the terms of the GNU General Public License as published by
;*  the Free Software Foundation, either version 2 of the License, or
;*  (at your option) any later version.
;*
;*  This program is distributed in the hope that it will be useful,
;*  but WITHOUT ANY WARRANTY; without even the implied warranty of
;*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
;*  See the GNU General Public License for more details.
;*
;*  You should have received a copy of the GNU General Public License
;*  along with this program.  If not, see <http://www.gnu.org/licenses/>
;*
;**********************************************************************

;Default to internal 16 Mhz factory calibrated oscillator

  #chip 12F1572

;Port Equates

  #define MIDI_OUT PORTA.0
  #define DATA_OUT PORTA.1
  #define MIDI_CLK PORTA.2
  #define ENABLE PORTA.3
  #define MIDI_IN PORTA.4
  #define DATA_IN PORTA.5

  #option Volatile MIDI_OUT
  #option Volatile DATA_OUT

;Set PWM parameters and activate Midi Clock on PORTA.2

  #define HPWM16_3_Freq 31.250   '31.250khz
  #define HPWM16_3_Duty 50       '50% duty
  HPWM16On ( 3 )

;Set-up gated MIDI output port and force it high

  Dir MIDI_OUT Out
  MIDI_OUT=1

;Set-up UART for MIDI output

  #define USART_BAUD_RATE 31250
  #define USART_TX_BLOCKING

  wait 1 s  'allow for Synth set-up time

;Set-up variables for use by PlayTune Player

  Dim length As Word
  Dim index As Word
  Dim delay As Word
  ReadTable intro,0,length  'retrieve length of table
  length=length+2           'and adjust value for read routine
  MbyteCnt=0                'zero message byte counter


;PlayTune Player (sends intro music to Synth upon power-up)

  For  index = 1 to length

  ReadTable intro,index,data   'get MIDI data from table
  Chan=(data AND 0bx11110000)  'extract channel byte if present

      If data=0xF0 Then Goto Done  'Leave if at end of data table

      If Chan=0x80 Then    'equals Note-Off?
        MbyteCnt=3         'Yes, preset for next byte in table
        data=data+0x30     'and then create Mode Change byte (0xBx)...
        HSerSend data      'Send it!
        data=0x7B          'ALL NOTES byte...
        HSerSend data      'Send it!
        data=0x00          'Velocity OFF byte... (to be sent below)
      Else
        MbyteCnt=MbyteCnt+1   'increment message byte count
      End If

      If Chan=0x90 AND MbyteCnt=4 Then  'Note-On without delay?
        MbyteCnt=1  'Yes, reset count, and then send Note-On byte
      End If

      If MbyteCnt=4 OR (index=1 AND Chan<>0x90)Then 'delay parameter?
        MbyteCnt=0                  'Yes, clear message byte count
        tmpH=data                   'and store high byte of delay
        index=index+1               'get ready to retrieve the next byte
        ReadTable intro,index,data  'now get low byte of delay from table
        delay=(tmpH*256)+data       'combine to create word...
        wait delay ms               'and use it for delay, not as note data!
      Else
        HSerSend data               'send MIDI data
      End If

  Next

  Done:
  TXEN=0  'Disable UART TX output --- give up port

;====================================================
; MAIN PROGRAM LOOP --- BEGIN
;====================================================

Main:

    do While ENABLE=1 'Keep looping if Motor Control is enabled

    ;activate SIO related outputs (take over SIO bus)
    Dir DATA_OUT Out
    Dir MIDI_CLK Out

    ;transfer DATA input to gated MIDI output
    temp=DATA_IN
    MIDI_OUT=temp

    ;transfer MIDI input to gated DATA output
    temp=MIDI_IN
    DATA_OUT=temp

    loop

;float SIO related outputs (free up SIO for other devices)
  Dir DATA_OUT In
  Dir MIDI_CLK In

;and force gated MIDI output high
  MIDI_OUT=1

Goto Main

;====================================================
; MAIN PROGRAM LOOP --- END
;====================================================

;Load Intro Music from file into ROM when flashed

  'PlayTunes binary format created with midi2tones.exe from MIDI file
  'Source: https://github.com/MLXXXp/midi2tones
  'Execute from command line: midi2tones -v -b -t16 basefilename

Table intro from "intro.bin"

.


This took a bit of head scratching, but I think overall it really came out quite nice :) .

In order to keep the MIDI file to a reasonable length that would fit into the PIC chip's ROM space, I opted to use a conversion program called midi2tones that converts from the more complicated standard MIDI into a sequential Note-ON/Note-Off file with simply delays between. Then using Great Cow Basic's easy file-to-table include feature, I was able to do a direct import during compile. So basically any intro tune may be substituted for my Star Wars R2D2 one, by running through the same process and calling it intro.bin, and then placing it in the same directory as the GCB source file.

I had to go with the 12F1572 instead of the 121571 because the built-in hardware UART is only available in the 12F1572. But I also got twice the ROM as well, which is proving to be very useful. The cost of these chips is almost ridiculous, being less than a dollar each (Digi-Key P/N: PIC12F1572-I/P-ND is selling for $0.71).

Although I took advantage of the PlayTune converter, my method of playback is completely different than implemented in the Arduino concept. With the Arduino, they are using individual DAC channels combined with a simple resistive mixing stage to produce the combined audio tone output. Whereas in my case, I am streaming the tune directly into the S2 Dream Blaster's MIDI-IN using the simplified MIDI data pretty much as is. This gives a better sound I'm sure.


Demo Video
https://www.youtube.com/watch?v=pYsZOUHzFlY&feature=youtu.be

  • Like 4
Link to comment
Share on other sites

Neat! I was wondering, how locked-in are you by using Great Cow Basic? Can you run the compiler locally?

 

BTW Here's another work-in-progress of a Wave Blaster board...

 

BTW2 this chip can also decode MP3/OGG/etc... if you can somehow drive the SPI interface ;)

 

The compiler is absolutely free and works under Windows, Wine, and Linux. And it's very easy to work with having powerful built-in support for the PIC hardware peripherals, as well as external peripheral devices such as LCDs, PS/2, SD, NunChuck, ect.

 

I'm curious why you asked if I'm locked into using it? To me it makes perfect sense being open source, zero cost, minimal learning curve and ease of use. I've never found an easier to learn tool for developing PIC code that also had the FREE price tag attached.

 

Besides it looks like I'm pretty much done developing the firmware for this project :) .

 

I'll be sure to check out your latest wave blaster board schematics in a bit.

Link to comment
Share on other sites

I'm curious why you asked if I'm locked into using it? To me it makes perfect sense being open source, zero cost, minimal learning curve and ease of use. I've never found an easier to learn tool for developing PIC code that also had the FREE price tag attached.

 

Ow, I guess that somehow I got it in my mind that it was a closed web-based environment, which it obviously is not. Don't know where that came from. Sorry :)

Link to comment
Share on other sites

No problem :) . But that does answer my question, because at first it did seem a bit odd.

 

The other thing worth mentioning, is that it can cross compile, letting you use a common language to code for either PICs or Arduinos.

 

it's also very efficient

https://www.youtube.com/watch?v=qdloFhULa3I

  • Like 3
Link to comment
Share on other sites

Very cool !

How about “Have you played Atari today ?” Tune as Intro ? :)

After tweaking the player code for a bit (that's why the code listing is at Beta7), and testing with multi MIDI file conversions, it appears good to go for anything I've thrown at it. So good news is you can have any intro music you desire :).

 

And for those that like quietude on boot, I'll have to provide a null file and/or a no intro version hex for flashing.

  • Like 2
Link to comment
Share on other sites

A must have. Digikey pn ED2108-ND

CONN IC DIP SOCKET 40POS GOLD

 

low profile and comes with a decoupling cap

 

8.10$ a piece

 

Other sizes as well

All my sockets on my 1200xl ran me about 80$

 

Turns out they are 9.10 apiece but they are gold plated.. also i spoke with a hacker on another AA trend and he stated that the dual decoupling caps actually will help any noise.

I just felt that a build would require a good foundation

 

Douglas

Link to comment
Share on other sites

Here's another work-in-progress of a Wave Blaster board...

 

BTW2 this chip can also decode MP3/OGG/etc... if you can somehow drive the SPI interface ;)

 

I see the SPI interface. That could be interesting to interface to, and with a slightly bigger PIC and the built-in SPI support it would be possible. But I'd have to study what those formats would require to see the true possibilities and/or if it would make sense to incorporate. Future version?

Link to comment
Share on other sites

Turns out they are 9.10 apiece but they are gold plated.. also i spoke with a hacker on another AA trend and he stated that the dual decoupling caps actually will help any noise.

I just felt that a build would require a good foundation

 

Douglas

The decoupling caps as I previously mentioned wouldn't line up with the actual power connections on the 40 pin Atari chips, and if anything would compromise any signal pins that they did connect to. So it's a no go for our situation. Sorry.

Link to comment
Share on other sites

I see the SPI interface. That could be interesting to interface to, and with a slightly bigger PIC and the built-in SPI support it would be possible. But I'd have to study what those formats would require to see the true possibilities and/or if it would make sense to incorporate. Future version?

 

I rechecked the datasheet and it seems the UART is only used for RT MIDI. Was hoping we could stream MP3 over it :/

 

I'd say future project, perhaps adding an SPI bus to the mainboard that lives somewhere between $d000 and $d7ff or a PBI device. Streaming 128kbps MP3 over SIO is pushing it. Better to write a byte somewhere that gets shifted out automatically.

 

The vs1053 board is coming along nicely. Forgot I need to level-shift MIDI-IN as the vs1053 is not 5V tolerant.

  • Like 3
Link to comment
Share on other sites

I rechecked the datasheet and it seems the UART is only used for RT MIDI. Was hoping we could stream MP3 over it :/

 

I'd say future project, perhaps adding an SPI bus to the mainboard that lives somewhere between $d000 and $d7ff or a PBI device. Streaming 128kbps MP3 over SIO is pushing it. Better to write a byte somewhere that gets shifted out automatically.

 

The vs1053 board is coming along nicely. Forgot I need to level-shift MIDI-IN as the vs1053 is not 5V tolerant.

 

I've always been intrigued with the idea of having an MP3 player attached to the bus (any bus... SIO or PBI). But unlike the MIDI board, the Atari wouldn't be doing much other than issuing Stop-Start-Track commands in most of the ideas I had floating through my brain. At least the MIDI interface gets the Atari much more involved with the actual composition (other than my PIC music intro aspect ;) ). But I never thought about having the A8 doing the actual streaming of MP3 data, hence being more involved in the process. But I agree that the PBI approach would likely be needed to do anything useful in this aspect.

 

Might be a fun future project indeed :grin: .

 

BTW, I found a long version of 'Relax' from the Frankie Goes to Hollywood album, and it sounds GREAT!!!! Especially if you hook this up to a good stereo system.

 

Here it is (change .txt to .mid after download: Relax.txt

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   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...