Jump to content

k-Pack

Members
  • Posts

    323
  • Joined

  • Last visited

Everything posted by k-Pack

  1. I still feel bad when I think about this one. I managed to buy a COVOX Voice Master and spent an extraordinary amount of time reprograming the game MOON LORD (published in ANALOG Computing) to accept voice commands. There were a couple of bugs but I was able to get through a few games. When I sold the Voice Master the disk went into the box and off it went. Can't play the game without the voice master hardware so why keep the program? A couple of months later I purchased it back from the guy at a much lower price and noted the program gone. Why? Oh! Why didn't I keep a back up copy.
  2. Nicely done. Listened to it three times and I could still listen to it again.
  3. After recording PRELUDE1.MP3 it seemed that the Atari BASIC sound program needed to be reprogrammed in assembly. I got out the MAC65 cart and two days later things were so messed up I wasn't sure if it was the Arduino and/or Atari software or the Arduino interface hardware giving me the headaches. I decided to go back and setup the equipment/software as it was for "house of the Rising sun". That seemed to work fine and it still did. I couldn't just turn it off and start programming. I had hookup the MIDIMax and played some MMS songs and then I wondered what it would sound like if I used the TRU connection and the miniEngine USB as a second sound source. As it turns out, the notes received on the Atari and miniEngine could be mixed to create some unique sounds. Later the software was stripped down to simplify the logic for conversion to assembly language. The simplified BASIC program was tested, compiled with MMG compiler and loaded on a MAX FLASH cart. Good news 'cause I don't need a monitor and disk drive to set up an Atari for sound generation. Before the assembly programing commences(again), this recording of Bach's Invention 1 was made. A 130XE, MIDIMax and MIDI Music System software send data out on channel one to the Arduino and same data was used bythe Atari800 and miniEngine Organ(#19) sound. The synths were on separate inputs to the mixer and then panned left and right. Two tracks were recorded one for MMS voice 1 and another for voice 2. The pan settings were changed to each track. Timing notes were recorded so the music tracks could be synced. These time notes were not deleted before exporting to an MP3. This is that file: Sound file invent01.mp3 Program files INVENT01.zip What else has been going on: 1- The initial design of an Arduino shield to be mounted between the Arduino and MIDI shield has been competed using Fritzing. The shield will hold the optocouplers and resistors that connect the Atari joystick ports and SIO motor control pins to the Arduino digital pins. I haven't really decided if or from where I am going to order. I only need one If multitrack recording techniques are going to be use. 2- I found a 3D printer model of the SIO design made by Norm8332 on Thingiverse. An AtariAge forum subject was started (sometime ago) with the link to the model. http://atariage.com/forums/topic/258097-3d-printed-atari-sio-plug-400800600xl-etc/ I'm still learning how to 3D print and forgot to take into account the shrinkage of the print material(PLA). The first attempts(5) were a little loose in the socket and the contacts were hard to get inserted. Since only 2 pins are needed for feedback from the Atari to the Arduino, it only takes a little effort to clean out the holes. Not sure I would want to do it for all 13. I measured a 2.6% difference between the printed and original. So of course, I did a test print on the plug at 1.03X and found it to be a little tight. Next I'll try 1.026X. 3- Having the software run from the AtariMax cart. is going to make life a lot easier. Just slip the cart into the slot and bootup. Hit return and away we go. No need for monitor or disks drive…accept… The joystick port is set by reverse logic. Turning on an Arduino pin turns on the optocoupler grounding the joystick pin to 0. At boot up the Arduino turns on all pins that ground the joystick port pins. The AtariMax menu expects only one pin to be grounded and gets confused when they all are. The setup() function needs to be programed to toggle the joystick trigger pin to start program one on the menu whenever the Arduino is turned on or reset. I just have to remember to turn on the Atari first. Who am I trying to kid. Is it really going to be that easy?
  4. For Sale: Your Atari Computer: a guide to Atari 400/800 personal computer by Ion Poole $15 should cover book and media mail in the contenental USA. Good condition. Binder cracked in several places but is holding together. No loose pages. PM me if interested.
  5. I've been wondering what I would do if my MidiMax were to stop working. It's nice to know that the midi projects would have a future. Thank you for uploading your designs.
  6. I've started a project to recreate W. Carlos's Switched on Bach album playlist using the Atari8 as a sound source. A goal on my bucket list is to finish it. I intend to use the MIDI Music System to send data to other Ataris that will act as sound synthesizers. My original thought was to have the ability to play the songs in real time; something Carlos couldn't do in 1968 when the album was published. Then I thought of something else that lead me to something else until I asked, "Am I ever going to play any of this music in front of anyone?" The use of multitrack recording software (Audacity) could make this whole operation a lot easier. How much easier? I wanted to test it by recording a music file created using Advanced Music System(AMS). Record a track for each of the 4 voices, Pan the voices left or right to create a stereo effect, sync the tracks using timing marks, and then export as an MP3 file. I chose PRELUDE1.AMS from my collection, a bit of classical music. Sounds like it could be Bach but I am guessing. It took about 3.5 hours to produce the recording on my second try. Once I relearned the AMS v1 commands it started to come back rather quickly. The Prelude1.AMS file was loaded and a measure to help sync the tracks was inserted at the beginning of each voice. The mono recording is of all 4 voices recorded on a single track. The stereo recording had each voice recorded on a separate track and each track was panned left or right of center. You should be able to hear the difference. Prelude1_ams mono.mp3 Prelude1_ams stereo.mp3 The first attempt was recorded without the timing measure and the FX processer on the mixer was set for each voice. The results sounded like crap and there was no way to fix it without starting over. You should be glad I did. Since I had to get the manual for AMS out of the folder, I decided to make a command summary sheet much like the MIDI Music System Command Summary sheet. If you think you might use AMS once ever few years you may want a copy of this. Advanced Music System 1 Command Summary.pdf And…. Within the manual there was a section on how to sink your multi track tape machine . After reading that section, I developed a greater appreciation for digital recording software and a much higher regard for Carlos's contributions to electronic music. Then….This turned into a longer term project when my son got me a small delta 3D printer for my birthday. After I learn how to use 3D design software, I plan to use the 5hrs it takes to print an object to complete the Carlos project.
  7. Had some fun recording this one. MP3 audio file batsam_mp3.zip
  8. I am setting up a couple Atari as a MIDI sound generators. Switched On Pokey is (maybe) the next logical step to reach much higher asperations. I think I have the hardware figured out, but need to varifie that sufficient data transfer rates can be achieved for a multi channel system. The two part inventions can be performed on one computer and then a second can be added for additional tracks. I have looked over sheet music for the Brandenburg Concerto and it looks like I might need a few more computers. I would very much like to play the music in real time. Something Carlos couldn't do on his 1968 Moog.
  9. I had the thought to recreate the track list of W. Carlos's Switched on Bach album using POKEY. I am ever-so-slowly getting the interface hardware built and programmed so that the 16 bit mode of sound generation on two computers can be used to generate 4 voices. I would like to use any Advanced Music System or MIDI Music System files that are available. My collection of music files is not well organized . The organized part doesn't seem to contain any of the tracks. Have you seen any of these titles? Please upload. Tracklist Sinfonia To Cantata No. 29 3:20 Air On A G String 2:27 AIRFOR.MUS Two-Part Invention In F Major 0:40 INVENT08.MUS Two-Part Invention In B-flat Minor 1:30 INVENT14.MUS Two-Part Invention In D Minor 0:55 INVENT104.MUS Jesu, Joy Of Man's Desiring 2:56 JOYOFMAN.MUS Prelude And Fugue No. 7 In E-Flat Major 7:07 Prelude And Fugue No. 2 In C Minor 2:43 Chorale Prelude "Wachet Auf" 3:37 Brandenburg Concerto No. 3 In G Major (First Movement) 6:35 BRAND.MUS Brandenburg Concerto No. 3 In G Major (Second Movement) 2:50 Brandenburg Concerto No. 3 In G Major (Third Movement) 5:05
  10. I ordered the MIDIPLUS miniEngine USB sound synthesizer to reward myself for doing something special. This is the first chance I've had to play with it and can't remember exactly what that something was. Maybe it wasn't that special. The thing that interested me most about this general midi sound module is its size( 3" X 4" X 1"). I just don't have the room to keep the TG-33 and sound mixer on my desk. If I want to have a short retro session, it can quickly be set up in a few minuets. I'm not going into great detail, its already on the web. I did (and still do) have some questions that the answers didn't appear in page one of the search engine results. I will be using it with an Atari8 with a Wizztronics MidiMax interface and MIDI Music System(MMS) software. If your retro computer can dump data out to a midi port this may be something to look into. I wasn't expecting $1000 worth of sound out of a $65 box. I am happy with it's sound. It has all the general MIDI instruments assigned to the standard patch numbers for use on all the channels except Channel 10; which is reserved for the Drum Kit. A reverb effect is built in and can be adjusted using the DATA wheel. This will have a great effect on the perceived sound quality. My biggest complaint is that it did not come with a MIDI Implementation Chart. I know it will accept NOTEON and NOTEOFF data on all channels, patches can be assigned to each channel and up to 64 notes can be played at the same time. I had the Casio DH-100 horn hooked up and noted a lack of after touch response and no portomento. (darn) I also noted that there were different drum kits on Channel 10. Assign different patch numbers to channel 10 to make the change. It would change on the 8s. Patch number 0 - 7 for the first drum kit, 8-15 for the second, and 16 - 23 for the third and so on. I lost my concentration in the higher numbers and can't really say what the effects were. There are other questions a Midi Implementation Chart might have answered. Like, can I turn on and off midi channels, incase I want to use more then one sound module? Can the channels be panned? Can the Channels be set for MONO or POLY? (I'm thinking no, no, and no.) Anyway…….., most of the youTube videos have examples of the patches. I have uploaded a zip file containing a complete composition in MP3 format and the original MMS file. I named it STARFIN back in the 80's when it was first produced using the Advanced Music System(AMS) for the Atari8. I called it Starfin for the fact that if I tried to write music for a living I would be starfin. The file got converted from AMS to MMS at some point. It contains 4 voices and each was assigned to a different channel. Voice 1(Channel 1) was assigned patch 118 Synth Drum. Voices 2-4(Channel 2-4) were assigned patch 81 Lead2(Saw Tooth). The Reverb was adjusted to 68 and then recorded using Audacity on the PC. The only adjustments to the recorded sound was to Normalize for a slight DC offset and a short Fade in was added. It was exported to a MP3 file and zipped. starfin_mp3 - midi engine.zip Sure, you can hook this up to your modern PC or tablet but where's the retro fun in that.
  11. The MULTIPLY function for Diamond GOS is stated as: MULTIPLY (39) - Word sized multiply(please note overflow error are not detected) Receives: W5 - Multiplicand 1 W6 - Multiplicand 2 Returns: W7 - Result As with the DIVIDE macro, the original macro received the numbers when calling it. It was changed to accept an address of the numbers and the numbers are then copied into W5 and W6. Original macro 8500 ; 8510 .MACRO MULTIPLY 8520 LDA # <%1 ;MULTIPLICAND 1 8530 STA W5 8540 LDA # >%1 8550 STA W5+1 8560 LDA # <%2 ;MULTIPLICAND 2 8570 STA W6 8580 LDA # >%2 8590 STA W6+1 8600 LDA #MULTIPLY 8610 JSR DIAMOND 8620 .ENDM 8630 ; Modified macro 8500 ; 8505 ;MODIFIED TO LOAD NUM FROM ADDR. 8506 ;KPACK - 5/16/2018 8510 .MACRO MULTIPLY 8520 LDA %1 ;MULTIPLICAND 1 8530 STA W5 8540 LDA %1+1 8550 STA W5+1 8560 LDA %2 ;MULTIPLICAND 2 8570 STA W6 8580 LDA %2+1 8590 STA W6+1 8600 LDA #MULTIPLY 8610 JSR DIAMOND 8620 .ENDM 8630 ; The test program: 10 ;THIS PROGRAM IS TO TEST CHANGES 20 ;TO THE DIAMOND MULTIPLY MACRO 30 ; 40 ;MACRO NOW LOAD NUMBERS AT ADDR 50 ; -NOT NUMBERS 60 ;DOUBLE BYTE MATH ON TWO NUMBERS. 70 ;RESULTS PRINTED IN HEX. 80 ; 90 ; 95 .OPT NO LIST 96 .OPT OBJ 0100 *= $2200 0110 .INCLUDE #D2:DMACRO01.M65 0120 ; 0130 NUM01 .WORD 1211 0140 NUM02 .WORD 37 0150 MULRST .WORD 0 ; MUL RESULTS 0180 DVAR .WORD 0 0190 HEXSTG .BYTE "$ ",255 0200 HEXCHR .BYTE $30,$31,$32,$33,$34 0210 .BYTE $35,$36,$37,$38,$39 0220 .BYTE $41,$42,$43,$44,$45 0230 .BYTE $46 0240 ; 0250 START INIT 0 0260 MULTIPLY NUM01,NUM02 0270 LDA W7 ;STORE RESULTS 0280 STA MULRST 0290 LDA W7+1 0300 STA MULRST+1 0400 LDA NUM01 ;LOAD NUM TO CONVERT 0410 STA DVAR 0420 LDA NUM01+1 0430 STA DVAR+1 0440 JSR DB2HEX 0450 SYSDRAW HEXSTG,10,20,0 0460 LDA NUM02 ;LOAD NUM TO CONVERT 0470 STA DVAR 0480 LDA NUM02+1 0490 STA DVAR+1 0500 JSR DB2HEX 0510 SYSDRAW HEXSTG,10,30,0 0520 LDA MULRST ;LOAD NUM TO CONVERT 0530 STA DVAR 0540 LDA MULRST+1 0550 STA DVAR+1 0560 JSR DB2HEX 0570 SYSDRAW HEXSTG,10,40,0 0691 LOOP EVENT 0692 LDA EVENTTYPE 0693 BEQ LOOP 0694 EXIT ;DIAMOND 0695 EXECDESKTOP 0696 ; 0700 ; 0710 ;CONVERT HEX TO STRING 0720 DB2HEX LDA DVAR 0730 AND #$0F 0740 TAX 0750 LDA HEXCHR,X 0760 STA HEXSTG+4 0770 LSR DVAR 0780 LSR DVAR 0790 LSR DVAR 0800 LSR DVAR 0810 LDX DVAR 0820 LDA HEXCHR,X 0830 STA HEXSTG+3 0840 LDA DVAR+1 0850 AND #$0F 0860 TAX 0870 LDA HEXCHR,X 0880 STA HEXSTG+2 0890 LSR DVAR+1 0900 LSR DVAR+1 0910 LSR DVAR+1 0930 LSR DVAR+1 0935 LDX DVAR+1 0940 LDA HEXCHR,X 0950 STA HEXSTG+1 0960 RTS 0970 ; 0980 *= $02E0 0990 .WORD START My test results are as follows: TEST# NUM01 * NUM02 = Result Correct 1 $0B44 $0025 $2F07 $AF07 2 $FFF6 $0025 $7E8E 3 $1FFF $0004 $7FFC 4 $1FFF $0005 $9FFB 5 $0004 $1FFF $7FFC 6 $0005 $1FFF $9FFB 7 $00FF $00FF $FE01 8 $FFFF $0001 $7FFFF $FFFF 9 $0001 $04BB $04BB 10 $0001 $FFFF ---- CRASH Every time I look at this list, I see numbers I should have tried. I just got tired of trying. There seems to be a problem when the result is above $7FFF but not always(#4). Switching the numbers can have unexpected results(#8 and #10). Zero should have been tested. The only recommendations I will make at this time is to know the limits of the numbers you will be using in your program and test them using the macro call. Now, I'm hoping I will remember that I wrote those words of wisdom the next time I have the need to call Diamond's MULTIPLY macro.
  12. Someday I'm going to take a photo while experimenting with DB9 connectors on the Atari Joystick ports or RS-232 ports and this box is going to be in the middle of a mess of wires. Some one is likely to ask, "What's up with that box?" This is an attempt to have this information ready to answer that very question. If your from the future, I guess it worked. It is simply a pass through box for each of the pins of a DB9 connector. It simply passes the signal for a pin to pin match when the header jumpers are in place. The exposed headers make it easy to read the voltages. The header pins also make it easier to wire hardware to the pins using female jumper cables. Remove the pin jumpers on the inner two rows of the header pins and it opens up the connection between pins. Connector wires can then be used to change the pins input signals to different output pins. One such case would be to make a null modem connection. This would be a good way to practice your soldering skills. No expensive components to burn up. The header pins should make it easy to check for solder bridges between pins. I'm glad I found the ones I created before anything was plugged into it. Materials 2 male DB 9 connectors 2 female DB 9 connectors 8 sections of 9 header pins 16 head pin jumpers prototype board box wires (from an old joystick cable, maybe You may want to purchase a couple of DB9 male and female gender changers. You'll know why when you need to plug a male ended cord into a male DB9 connector.
  13. While programing dMetronome I had to learn a few things. How to divide the number of DLIs in a minute by the number of DLIs to get beats per min. I finally got to the point where I could use the Diamond Macro Divide to handle the division and as long as I kept the answer to one byte I was fine but there were many tribulations along the way. My first revelation was that the macro needed the numbers to be passed to them. Many of the d-macros pass the address pointer to W0 to W7 but not the divide and multiply macros. They require that the numbers be passed to the macro. The answer is much different when dividing two numbers or two address . The macros were changed to accept 2 addresses as pointers and then the macro moves the numbers at those addresses into W4 and W5. The answer of the division will be located at W6 and W7. Original DIVIDE Macro 8630 ; 8640 .MACRO DIVIDE 8650 LDA # <%1 ;NUMBER 8660 STA W4 8670 LDA # >%1 8680 STA W4+1 8690 LDA # <%2 ;DIVISOR 8700 STA W5 8710 LDA # >%2 8720 STA W5+1 8730 LDA #DIVIDE 8740 JSR DIAMOND 8750 .ENDM 8760 ; Modified Macro 8630 ; 8635 ;MODIFIED TO LOAD NUM FROM ADDR. 8636 ;KPACK - 5/16/2018 8640 .MACRO DIVIDE 8650 LDA %1 ;NUMBER 8660 STA W4 8670 LDA %1+1 8680 STA W4+1 8690 LDA %2 ;DIVISOR 8700 STA W5 8710 LDA %2+1 8720 STA W5+1 8730 LDA #DIVIDE 8740 JSR DIAMOND 8750 .ENDM 8760 ; This would seem to make more sense but luckily on the first try I used 2 numbers that yielded erroneous results. The following program was used to test the modified macro. Change the values for NUM01 and NUM02, compile to evaluate the result. Test Program 10 ;THIS PROGRAM IS TO TEST CHANGES 20 ;MADE TO THE DIAMOND MACRO LIBRARY 30 ; 40 ;MACRO NOW LOADS NUMBERS AT ADDR. 50 ;NOT NUMBERS 60 ; DOUBLE BYTE MATH ON TWO NUMBERS. 70 ; RESULTS PRINTED IN HEX. 80 ; 90 ; 0100 .OPT NO LIST 0110 .OPT OBJ 0120 *= $2200 0130 .INCLUDE #D2:DMACRO01.M65 0140 ; 0150 NUM01 .WORD 1211 0160 NUM02 .WORD 37 0180 DIVRST .WORD 0 ; DIV RESULTS 0190 DIVREM .WORD 0 ; DIV REMAINDER 0200 DVAR .WORD 0 ;Used to hold print variable 0210 HEXSTG .BYTE "$ ",255 ; 4 spaces for double byte 0220 HEXCHR .BYTE $30,$31,$32,$33,$34 0230 .BYTE $35,$36,$37,$38,$39 0240 .BYTE $41,$42,$43,$44,$45 0250 .BYTE $46 0260 ; 0270 START INIT 0 0280 DIVIDE NUM01,NUM02 0290 LDA W6 ;STORE RESULTS 0300 STA DIVRST 0310 LDA W6+1 0320 STA DIVRST+1 0330 LDA W7 0340 STA DIVREM 0350 LDA W7+1 0360 STA DIVREM+1 0370 LDA NUM01 ;LOAD NUM TO CONVERT 0380 STA DVAR 0390 LDA NUM01+1 0400 STA DVAR+1 0410 JSR DB2HEX 0420 SYSDRAW HEXSTG,10,20,0 0430 LDA NUM02 ;LOAD NUM TO CONVERT 0440 STA DVAR 0450 LDA NUM02+1 0460 STA DVAR+1 0470 JSR DB2HEX 0480 SYSDRAW HEXSTG,10,30,0 0490 LDA DIVRST ;LOAD NUM TO CONVERT 0500 STA DVAR 0510 LDA DIVRST+1 0520 STA DVAR+1 0530 JSR DB2HEX 0540 SYSDRAW HEXSTG,10,50,0 0550 LDA DIVREM ;LOAD NUM TO CONVERT 0560 STA DVAR 0570 LDA DIVREM+1 0580 STA DVAR+1 0590 JSR DB2HEX 0600 SYSDRAW HEXSTG,10,60,0 0610 LOOP EVENT 0620 LDA EVENTTYPE 0630 BEQ LOOP 0640 EXIT ;DIAMOND 0650 EXECDESKTOP 0660 ; 0670 ; 0680 ;CONVERT HEX TO STRING 0690 DB2HEX LDA DVAR 0700 AND #$0F 0710 TAX 0720 LDA HEXCHR,X 0730 STA HEXSTG+4 0740 LSR DVAR 0750 LSR DVAR 0760 LSR DVAR 0770 LSR DVAR 0780 LDX DVAR 0790 LDA HEXCHR,X 0800 STA HEXSTG+3 0810 LDA DVAR+1 0820 AND #$0F 0830 TAX 0840 LDA HEXCHR,X 0850 STA HEXSTG+2 0860 LSR DVAR+1 0870 LSR DVAR+1 0880 LSR DVAR+1 0890 LSR DVAR+1 0900 LDX DVAR+1 0910 LDA HEXCHR,X 0920 STA HEXSTG+1 0930 RTS 0940 ; 0950 *= $02E0 0960 .WORD START This is a list of the numbers used for the tests and the results as printed to the screen. Test NUM01 / NUM02 = Result Remainder (W4) (W5) (W6) (W7) 1 $04BB $0025 $0020 $001B 2 $FFFF $0001 crash 3 $FFFF $FFFF crash 4 $B478 $C3B2 crash 5 $0000 $F2F7 $0000 $0000 6 $F2F7 $0AB4 crash - 7 $FFFE $0002 crash 8 $0FFF $0002 $07FF $0001 - 9 $7FFF $0002 $3FFF $0001 10 $8000 $0002 crash - 11 $0002 $7FFF $0000 $0002 12 $0002 $8000 $0000 $0002 13 $0002 $FFFF $0000 $0002 14 $7FFF $7FFF $0001 $0000 15 $75D1 $72A5 $0001 $032C After test 6 it was noted that any number that had bit 15 set might crash Diamond 3.0. Test 7 and 8 proved that it is within the upper 4 bits of the double byte number that a problem occurred. Test 9 and 10 proved that it was bit 15 that was the problem. Tests 11 - 15 were tried to verify the crash point. In conclusion I believe (at this moment in time) that the DIVIDE macro, as modified, will accept the addr-s for 2 numbers and give the proper results if: The numerator (NUM01) is between 0 - 32767 ($0000 - $7FFF). The denominator(NUM02) is a double byte number but not 0. Disclaimer: I have only tested the Divide Diamond function on my Diamond 3.0 cartridge. I have included the ATR with the source files so you can generate test results on your system. You'll need the MAC/65 cart. div macro test.zip I'm not up to delving into the Diamond Source code and will simply try to stay within the restrictions defined above. Of course, if these assumptions are incorrect I won't find out until after I click "Publish". When the tests on the multiply function have been finalized a report will be issued.
  14. The dMetronome project was my first requiring multibyte math. Now I want to modifiy the Diamond Macros for Multiply and Divide to make them easier to use. I have written the test program and am getting unexpedted results for the MULTIPLY function. I'm hoping someone can/will run the MATHTEST.APP and let me know their results. I would like to varifiy resutls for Diamond 2.0 and 3.0. The program simply lists the following numbers in HEX. 1 number 1 2 number 2 3 multpication result 4 division result 5 division remainder Once the numbers are displayed the program waits for an event(key press or mouse click) and returns to the desktop. I have included the source code but not the modified macro file. I will post in the "Diamond in the Rough" blog when I understand the problem(s) I'm having. Thanks in advance. MATHTEST.zip
  15. I am going to add another option to transfer data to and from an Arduino. If you have/or can get a RS-232 interface (850 or P:R:Connection) you can equip the Arduino with a TTL to RS232 converter and null modem the two ports. I have documented this in my Out of the Pack blog. http://atariage.com/forums/blog/572/entry-11653-atari-8-bit-850-interface-rs232-shield-arduino/ Working with the R: device may not be easy but at least the driver software has already been written. There are several other Atari/Arduino interfacing projects within the blog that you may find of interest.
  16. I played around with a couple of 28BYJ - 5V Stepper Motors on an Arduino and was going to try and hook 2 up to the Atari joystick ports. I found that I ran out of data pins rather quickly. I was able to use a 74HC595 - 8-bit shift register with output latches(A.K.A serial to parallel converter). I could control the coil sequence for two stepper motors with 3 bits; Data, Clock, and Latch. You might be able to use one of the extra bits can be used for pen up and pen down. Just a thought.
  17. Every computer needs a metronome program but only a few Atari8 owners have the Diamond GOS to run this one and even fewer would want to build the simple hardware to hear it. {video removed} It may have been easier to write this one in BASIC but I wanted to get back into Assembly and thought a metronome based on the software timer example in De Re Atari would be a good place to start. The original idea involved pulsing the Cassette Motor Control(CMC) pin on the SIO, then it evolved into a metronome with a bunch of options, and then it digressed back into controlling the timing of the CMC. The first problem was getting the tick to make a reliable POKEY sound. Most of the programming changes seemed to make the problem worse until it stopped entirely. A LED and 330ohm resister was used on the CMC pin to monitor its blinking. It did blink. Gone was the POKEY sound. The second circuit was thrown together with a speaker salvaged from a greeting card. This clicked and blinked. (and hasn't burned out yet) A slider bar to adjust the BPM was going to be programmed but by the time the math started working, Two arrow icons were used. Click one icon to increase the DLI counter (1 = 1/60 second). Click the other to decrease. The DLI counter can be set between 15 and 155 - 60ths of a second(240 - 23 beats/min). This kept the math programming to a minimum and the values were limited to 3 figures to simplifying printing them to the screen. If you find the greeting card speaker to be inadequate, I programed an Arduino to check the output from the CMC and send out a MIDI - NOTEON,C2,127 for each pulse it detects. This so happens to be the base drum. /* This program accepts a digital input to activate * output to a midi device. * * used to test dMetronome on the Atari 130EX. * digital signial from Cassette Motor Control. */ int inPin = 5; //pulse input pin int pulse; //logic value of pin int midiCommand = 153; //noteon channel 10 int midiNote = 36; //C2-base drum int midiVol = 127; //volumn max int midiVolOff = 0; //volumn off void setup() { pinMode(inPin, INPUT); Serial.begin(31250); //midi baud rate } void loop() { pulse = digitalRead(inPin); if(pulse == HIGH){ //send midi data Serial.write(midiCommand); Serial.write(midiNote); Serial.write(midiVol); delay(5); Serial.write(midiCommand); Serial.write(midiNote); Serial.write(midiVolOff); } } The program is on the ATR and titled DMETRON.APP. Boot up with Diamond and connect you device. I have tested the program with Diamond 3.0 on a 130xe using DOS 2.5. It should run on Diamond 2.0 because the diamond functions used are in both carts. dMetron_atr.zip Those long assembly language listings in Analog always intimidated me. I tried splitting up the program into smaller files and #including them. I thought that working with a group of small files would help and it did in some ways. I could test many of the subroutines independent of the others and could find the locations of interest if I remembered which file was of interest. It did slow down development near the end when the locating the numbers on the screen required tweaking. There were two function calls in two files to set up the display. It ended up being somewhat tedious. MAC/65 source code for central program. The rest is in the zip file. DMACROSM.M65 are the diamond function macros with Paraprint modification as described in a previous blog entry. 0100 ;dMetronome 5/2018 0110 ; 0120 ;A Diamond GOS METRONOME program 0130 ;to output a pulse to the SI/O 0140 ;cassette motor control to 0150 ;activate external hardware 0160 ; 0170 *= $2000 0180 ; 0190 .OPT NO LIST 0200 .OPT OBJ 0210 ; 0220 ; LIBRARY 0230 .INCLUDE #D1:SYSEQU.M65 0240 .INCLUDE #D1:LIBRARY.M65 0250 .INCLUDE #D1:DMACROSM.M65 0260 ; 0270 ;JRS SUBROUTINES 0280 .INCLUDE #D2:INFODIA.M65 0290 .INCLUDE #D2:DROPMENU.M65 0300 .INCLUDE #D2:DLITIMER.M65 0310 .INCLUDE #D2:INITICON.M65 0320 .INCLUDE #D2:PRNTIME.M65 0330 .INCLUDE #D2:PRNBPM.M65 0340 ; 0350 PU .BYTE " 030 - 60TH SEC. ",255 0360 BPMU .BYTE "BPM",255 0390 NUMCHR 0400 .BYTE $30,$31,$32,$33,$34 0410 .BYTE $35,$36,$37,$38,$39 0420 ; 0430 START 0440 INIT 0 0450 JSR DROPMENU 0460 JSR PLACEICONS 0465 SYSDRAW PU,11,138,0 0470 JSR INIDLI 0480 JSR INFODIA 0485 SYSDRAW BPMU,25,72,0 0487 JSR PRNTIME 0489 JSR PRNBPM 0490 .INCLUDE #D2:EVENT.M65 0500 ; 0510 *= $02E0 0520 .WORD START
  18. Yes Maybe, but not sure what it would be.
  19. Programing Axiom - The solution for every programming problem becomes obvious only after the solution has been found. The PARAPRNT(2) and SYSDRAW(44) Diamond functions are both used to print text or font elements to the screen. The SYSDRAW is fast because it is a no frills text display function. If you have the time, the PARAPRINT allows the use of control characters in the text object to create bold, italic, outline, underline, inverse, light, mirror, and reverse characters. You can also change fonts and enlarge the print using magnification factors. The 3.0 programming manual covers PARAPRINT and the text object on page 6 and 7. I had a problem getting the PARAPRNT macro to display a three character string at magnification level 4 for both height and width. Actually I couldn't get the macro to display anything and it took me a couple of days to find the obvious solution. The Function parameters as explained in Appendix I: Function Reference PARAPRNT (2) - Prints a text string using Diamond's styling and font features. Receives: B0 - X Offset B1 - Y Offset B2 - Line spacing W1 - X Position W2 - Y Position W3 - X Clipping Location W4 - Y Clipping Location W5 - Address of the Text String Returns: None You can set up the Diamond registers, load the Accumulator with the function number and JSR to Diamond or…… Use the MAC/65 PARAPRNT macro in the DMACROS.M65 file. There are a few options that are configured within the macro. If you are not using the B0,B1,W3 and W4 settings you can use the macro call …. PARAPRNT ADDR of TEXT, X,Y,LINESPACING Although I couldn't get it to work until….. Spoiler Alert - just in case you want to solve this one on your own. The obvious solution is: 1- In the macro file DMACROS.M65, locate the PARAPRNT macro . PARAPRNT is the second macro in the file. The line number changes if you are using the library included with Developer's Kit version 2.0 or 3.0. 2- You want to set W3 and W4 to $FF. Add the line "LDA #$FF" after the line setting B1 to 0. LDA #0 STA B0 STA B1 LDA #$FF ;added date by self STA W3 STA W3+1 STA W4 STA W4+1 3- comment this line for future reference and save the macros. 4- Be sure the .INCLUDE directive is pointing to the revised file. I started seeing characters printed to the screen on the first try using the modified macro. The following example code is being used to build and test a subroutine that will be added to a much larger program. Its what was used to test the macro fix. 10 ;MATH AND PRINT SUBROUTINE TEST 20 ; 30 .OPT NO LIST 40 *= $4000 50 ; 60 .INCLUDE #D:DMACROS.M65 70 ; 80 PU .BYTE "XXX - 60THS SEC.",255 90 PBLANK .BYTE " ",255 0100 BPMU .BYTE "BPM",255 0110 BPMBLANK .BYTE 252,0,254,4,255,4 0120 .BYTE "123",0 ;CHANGE LATER 0130 ; 0140 START ; DIAMOND MACROS 0150 INIT 0 0160 SYSDRAW PU,11,125,0 0170 SYSDRAW BPMU,25,72,0 0180 PARAPRNT BPMBLANK,52,48,8 0190 ; 0200 ; 0210 LOOP EVENT 0220 LDA EVENTTYPE 0230 BEQ LOOP 0240 EXIT 0250 EXECDESKTOP 0260 ; 0270 *= $02E0 0280 .WORD START P.S. If this is old news please let me know where I can find any other old Diamond news on the web.
  20. Thought I wouldn't be able to try it out when I saw that my phone is running iOS 7 and its up to date. Then I remembered my wife's iPad. She let me download the game and I finished level one in 15+ seconds. I'm hoping to do better the next time I try. Looks like its going to be a good challenge. I was thinking about getting an ebook to read but this program should be a lot more entertaining.
  21. If you found the dialog reference sheet of interest, I'm sure this reference for creating a menu bar will be just as interesting. Menu Bar reference sheet.pdf This next Diamond project was going to be written in BASIC. When I looked at all the information tables, pointers and data strings needing to be defined as BASIC string variables, assembly language seemed to be the way to go. Especially since my assembler is the MAC/65. The Diamond Develop disk has a library with MAC/65 macros for each of the functions. I have found programing the Arduino using their version of "C" to have some similarities to MAC/65, in that, without the libraries I would be in deep do-do. There are some very talented programmers writing code so I don't have to. Thank you. The more library functions I use in a program, the less I feel like I'm writing a program. Using prewritten blocks of code makes me want to call my efforts "building a program". Of course that makes no cents when you consider BASIC is nothing more then macro calls to machine language subroutines. Looking over my library files has made it apparent that I can't remember the what, were and who of some of these library files. I see that I could have used the BGT (Branch greater than) a couple of days ago. Probably would have worked better then the BAW (Branch any where) that I wrote.
  22. When starting a Diamond project, I have a tendency to utilize a lot more design time before sitting down in front of a computer. Sketching out displays, icons and menus seem to consume a lot of time but having this all worked out before committing it to code helps. (Random Thought - Remember going into the office supply store and finding a whole section of graph paper. This time I had to ask the clerk where it was. He pointed me toward the paper section and said, "Its next to the carbon paper." I found one - 5 squares to the inch spiral binder.) Probably the first thing that I design is the title dialog box (sometimes called "about" or "Info…" in the drop down menu. It holds important information about the title, version #, author and the date. It kind of represents the big picture and helps solidify a commitment to the project. And…. Each time I start coding a project I seem to be spending a day or two trying to make the screen look like the sketches. And… I always say that I'm going to take notes on the process so I don't have relearn it each time. And…. Each time I didn't. So this time, I made this reference sheet on how to define a dialog box, put a text object into it and define the hole box as a touch area. All the information I need to create a simple info box. Its definitely not a substitute for the manual. Diamond Simple Dialog.pdf All the information is in the Diamond Develop Manual but scattered on several pages though out the manual. My biggest problem was figuring out the reference points. Where the 0,0 reference point is seems to change. I concluded that the touch areas are located using the upper left corner on the outer edge of the boarder. The text is place in reference to the upper left-corner inside the boarder and is calculated using the lower left corner of the first print character. The other thing to keep straight is the count units. Are you counting bytes, characters, color clocks, pixels or scan lines? I did the rough draft of the reference sheet and tested it by designing the HELLO WORLD dialog box. I found one misconception on the reference sheet and 3 mistakes in math. I believe those have been corrected. I hope to be running more tests before the end of the year. I'll up date with any refinements in the comment area, so check back here if you should ever be in need of a simple text dialog box. This HELLO WORD Dialog box was programed using M65 and the Diamond macro library from the Diamond Develop Kit. 0100 ;HELLO WORLD dialog example 0110 ; 0120 .OPT NO LIST 0130 *= $4000 0140 ; 0150 .INCLUDE #D:DMACROS1.M65 0160 ; 0170 HELLOOBJ 0180 .BYTE 1 ;TEXT OBJECT 0190 .WORD HELLOSTRING ;ADDRESS 0200 .WORD 0 ;START X 0210 .WORD 8 ;BOTTOM OF FIRST LINE OF TEXT 0220 .BYTE 8 ;SCAN LINES/LINE FEED 0230 .BYTE 255 ;END OF LIST 0235 ; 0240 HELLOSTRING ; TEXT 0250 .BYTE "HELLO",13 ;LINE FEED 0260 .BYTE "WORLD" 0270 .BYTE 0 :END STRING 0275 ; 0280 HELLOTOUCH 0290 .BYTE 0,28,0,36 ;WHOLE BOX 0300 .BYTE 255 ;END OF LIST 0310 ; 0320 ; 0330 START ; DIAMOND MACROS 0340 INIT 0 0350 DODIALOG 7,32,HELLOOBJ,HELLOTOUCH 0360 EVENTDIALOG 0370 RELEASEDIALOG 0380 EXIT 0390 EXECDESKTOP 0400 ; 0410 *= $02E0 0420 .WORD START
  23. I was thinking about making an 8-step sequencer for a Gakken SX-150 Mark II analog synthesizer using the Atari8. Then I thought, "Why not just use the Pokey chip instead of the Gakken? " Then I thought, "Why not develop it using Diamond GOS? I'll bet no one has done that yet." While reading up on the hardware and software timers, the metronome program in De Re Atari looked like it could be easily modified with a Diamond upgrade to change the tempo using a slide bar. It was a good idea but it would not run as listed and decided to get it running without Diamond. In the book De Re Atari the hardware timers are explained on page 8-39 and the software timers on 8-40. As an example of using a software timer, a metronome was programed in two parts. Figure 8-19 lists the Assembly language that runs during the vertical blank. With this routine running in the background the BASIC program(figure 8-18) can be used to adjust the beats/min using a joystick. As fate would have it, the routine would not run on the 130XE as listed. The following changes were made to the Assembly code using MAC65. 1- the sound registers were reset. 2- relocated the time set byte (ZTIME) from $00 to the byte after the ML program($403D) 3- the program was compiled at $4000. Changes to the BASIC code: 1. GRAPHIC 0 added to line 5 2. Modified line 56 PRINT 3. Line 60 POKEs X into ZTIME at location 16445 4. Line 70 changed to GOTO 20. Not sure where NEXT came from. If you want to look at the code or need a metronome, the files are in the zipped ATR. METRONOM.zip To RUN: 1. Boot with disk in Drive #1. The metronome should start after AUTORUN.SYS executes. 2. RUN "D:METRONOM.BAS" at BASIC's READY prompt. 3. Move Joystick 1 forward and back to adjust the beats/min. ATR Directory: DOS/DUP - Atari 2.5 AUTORUN.SYS - copy of DERE0844.OBJ DERE0844.M65 - ML Source code DERE0844.OBJ - Compiled code at $4000 METRONOM.BAS - Adjusts beats/min of object code. README.TXT I learned a lot about the software timers while trouble shooting this program. I'm feeling pretty confident that a Diamond GOS facade can be built.
  24. Word processing - You can write a memo without every keystroke being transmitted to Big Brother. Sorry, I didn't mean to sound paranoid. Turn off your Wi-Fi or disconnect the Ethernet cable and essentially you can do the same things but without the glitter.
×
×
  • Create New...