Good book that walks you through using your Coleco Adam.
The Basic Adam (pdf 403mb)
Good book that walks you through using your Coleco Adam.
The Basic Adam (pdf 403mb)
This is a great book if you want to get familiar with how CP/M works and how to use it.
Soul of CP/M (pdf 235mb)
I have been experimenting with MicroFox’s Floppy Disk Emulator, also known as the Virtual Disk Drive (VDD). Using some software I wrote on my PC I was able to create a 64mb disk image that the VDD would open (64mb is the limit it appears) and then initialize it with EOS and it is recognized as a 64MB disk. The AdamEM emulator on the other hand doesn’t like it, but that is ok.
Here is a copy of this blank, initialized disk image. Copy some files to it, let me know how it works out.
Keno, Bandit, Lfiler, Menu, Hangman, Stars, Draw, Flite, Boogie, Nerds, Jump and Lander.
I can not figure out how to load the files in SMART Logo when Logo is in disk drive 1 and the games are in disk drive 2 when in the emulator so if you know, let me know.
In the late 70’s, early 80’s there were many magazines and books devoted to the personal computers of the time that contained programs that you could type into your computer, save and use. Though tedious it was often the only way many people could get new software for their orphaned systems. With this in mind I present DDP Verify, a small type in that will let you non-destructively verify if your tapes are good or not.
To begin with you will need a blank tape and a tape containing a copy of Smart Basic. The reason for two tapes is we will be creating a quick booting tape that will be used to verify other tapes. If you happen to run any of the programs with the Smart Basic tape in drive 1 IT WILL ERASE you Smart Basic tape. If you have an original Colecovision Smart Basic version 1.0 you will want to do something before you get started. You will want to squash a bug!
There is a bug in Smart Basic in that every time you load a program with a REM or DATA statement it will add an extra space after the REM or DATA, eventually pushing your code off the line and ruining the code. To fix this is easy:
If you already have a HELLO program on your tape, load it and add the code above to it in the beginning. You can eliminate line 10 and line 60 if you want and combine all the POKEs onto one line.
Now we are ready to start typing in earnest! To create the DDP Verify tape we need to type in the loader which reads the data and the data statements which holds the program. First I will explain the loader:
1 HIMEM :39000: R = 40004: B = 40128 2 DATA 1,0,0,17,0,0,62,8,33,192,156,205,246,252,201 3 FOR K = 40000 TO 40014: READ D: POKE K,D: NEXT K 4 PRINT "PLACE BLANK TAPE IN DRIVE #1": PRINT "AND PRESS RETURN": INPUT Z$ 5 READ A 6 IF A = -3 THEN CALL 40000: PRINT " DONE":END 7 IF A = -2 THEN READ A: POKE R,A: PRINT "WRITING RECORD ";A;: GOTO 5 8 IF A = -1 THEN READ A: FOR K = 0 TO 15: POKE B,A: B = B + 1: NEXT K: GOTO 5 9 POKE B,A: B = B + 1: GOTO 5
How it works:
1 > Tell SB to not touch memory above 39000 and set up the variables R and B. R holds where we will poke tape records and B is where our tape record buffer is.
2 > This is a small machine language (ML) code that we use to access the EOS routines to write a block to tape. The variable R which we defined in line 1 points to the block low byte. Here is the code:
LD BC,0 ;Block High Byte
LD DE,0 ;Block Low Byte
LD A,8 ;Tape drive 1
LD HL,40128 ;Buffer
CALL 0FCF6h ;Write one block
3 > This line reads in the ML in line 2 and pokes it into memory starting at address 40128 which we defined on line 1
4 > This line pauses and prompts you to put in the blank tape we will be turning into a the Verify tape – PLEASE follow this instruction.
5 > This reads in a byte from the data statements. The byte can have one of 4 values:
0 – 255 = This is a byte that will be poked into memory
-1 = This tells the loader that the next byte to be read gets poked into memory 16 times – This saves on typing
-2 = This tells the loader that the next byte contains the record number this block of data gets saved to
-3 = This tells the loader we are done, write the block to tape and end
6 – 8 > These lines process the data that is read as described above
9 > Pokes the data into memory at B, increments B and then loops back to line 5 to do more
Once you have typed in the LOADER program save it. Now we will type in the code:
30 DATA -2,0 31 DATA 243,049,142,211,120,050,255,255,033,050,201,017,088,246,001,003 32 DATA 000,237,176,001,000,000,205,032,253,001,192,001,205,032,253,033 33 DATA 000,000,062,003,205,041,253,033,000,008,062,002,205,041,253,205 34 DATA 056,253,017,000,004,033,000,000,001,128,000,205,023,253,033,192 35 DATA 011,062,004,205,041,253,033,000,056,062,001,205,041,253,033,128 36 DATA 056,175,205,041,253,001,001,007,205,032,253,014,003,006,001,022 37 DATA 000,030,000,033,192,011,025,017,032,000,121,203,007,203,007,203 38 DATA 007,203,007,128,205,038,253,006,031,014,023,022,000,030,000,033 39 DATA 000,008,205,054,252,062,032,017,000,003,033,000,008,205,038,253 40 DATA 062,000,050,053,201,033,054,201,205,041,201,033,187,201,205,013 41 DATA 201,205,108,252,033,005,202,205,013,201,062,028,022,000,030,006 42 DATA 205,057,252,006,255,014,001,017,000,000,197,033,184,201,205,041 43 DATA 201,001,000,000,058,255,255,033,000,001,205,243,252,032,004,062 44 DATA 079,024,020,033,110,202,205,013,201,205,108,252,033,005,202,205 45 DATA 013,201,062,127,050,053,201,205,051,252,193,019,016,204,062,001 46 DATA 185,032,006,014,000,006,001,024,193,033,007,202,058,053,201,183 47 DATA 040,003,033,059,202,205,013,201,205,108,252,024,131,058,166,254 48 DATA 087,058,165,254,095,213,062,028,022,000,030,020,205,057,252,205 49 DATA 041,201,209,062,028,205,057,252,201,126,183,200,205,057,252,035 50 DATA 024,247,000,000,000,000,012,043,045,045,045,045,045,045,045,045 51 DATA 045,045,045,045,045,045,045,045,045,045,045,045,045,045,045,045 52 DATA 045,045,045,045,045,045,043,124,032,068,068,080,032,086,101,114 53 DATA 105,102,121,032,040,099,041,032,087,105,108,108,105,097,109,032 54 DATA 072,105,099,107,115,032,124,043,045,045,045,045,045,045,045,045 55 DATA 045,045,045,045,045,045,045,045,045,045,045,045,045,045,045,045 56 DATA 045,045,045,045,045,045,043,013,010,032,111,032,061,032,082,101 57 DATA 097,100,105,110,103,032,079,032,061,032,080,097,115,115,032,127 58 DATA 032,061,032,070,097,105,108,000,111,008,000,032,082,101,112,108 59 DATA 097,099,101,032,116,097,112,101,032,119,105,116,104,032,116,104 60 DATA 101,032,116,097,112,101,013,010,032,116,111,032,098,101,032,118 61 DATA 101,114,105,102,105,101,100,032,097,110,100,032,116,104,101,110 62 DATA 013,010,032,112,114,101,115,115,032,097,110,121,032,107,101,121 63 DATA 046,046,046,032,000,024,000,032,078,111,032,101,114,114,111,114 64 DATA 115,032,112,114,101,115,101,110,116,044,032,112,114,101,115,115 65 DATA 032,097,110,121,013,010,032,107,101,121,032,116,111,032,099,111 66 DATA 110,116,105,110,117,101,046,046,046,032,000,032,069,114,114,111 67 DATA 114,040,115,041,032,112,114,101,115,101,110,116,044,032,112,114 68 DATA 101,115,115,032,097,110,121,013,010,032,107,101,121,032,116,111 69 DATA 032,099,111,110,116,105,110,117,101,046,046,046,032,000,032,065 70 DATA 100,106,117,115,116,032,116,097,112,101,032,116,104,101,110,032 71 DATA 112,114,101,115,115,013,010,032,097,110,121,032,107,101,121,032 72 DATA 116,111,032,099,111,110,116,105,110,117,101,046,046,046,032,000 73 DATA -3
This is the code for DDP – Verify. Once you have typed in it save it as VERIFY. DO NOT RUN IT – If you do it will ruin the tape you have in the drive.
After saving VERIFY remove the SMART BASIC tape and put in the blank INITIALIZED one you made. Run VERIFY and follow the prompts. When done you should be able to reset the system and DDP Verify will start. You can then follow the prompts on the screen to start verifying your tapes.
When DDP Verify is running it will show a ‘o’ as it is reading a block, and a ‘O’ if the block passes or the checkerboard if it doesn’t. If you want to know which block it is you can count them on the screen. Each line is 32 blocks long so if you fail on the first column on row 3 then you failed on 2 * 32 + 1 or block 65. I kept things simple to decrease the amount of code and typing in.
If you decide to do this let me know.
I do not have an actual disk drive to test this on, I use the emulator of the floppy emulator on my Adam but if you do can you test this:
This is a very brief post that I will give more information on later:
As part of the first of many new games that I will be selling for the Adam this year I have come up with a way of creating quick data packs to hold these games. My games (and other software) are standalone products and as such do not need a complete 256kb data pack to hold them. So to make it easier I have figured out how to make a data pack in 5 minutes that will hold about 20kb of data. To do this is easy, but before you do you may wish to read this post on making a true data pack as you will be doing the same thing with some minor changes.
To make a 5 minute tape you are going to do what is detailed in the post about making data packs from audio tapes with the exception that you will need a timer. Set the timer for 5 minutes then start recording side A. When the time goes off. stop both decks, flip both tapes and record side B. Then follow the steps in the previous post about making the holes in the new tape.
You can use File Manager to copy up to 23 blocks on the new tape you created. The first block is the code that loads when you reset the Adam and needs to be on block 0. The remaining blocks hold code that you would load with a loader routine that is part of the block 0 code. I will detail how this can be done later.
I am proud to announce the first of many new software titles available for the Coleco Adam computer:
For more details and to preorder visit: Retro System Rescue
If you are going to be doing any serious z80 programming then you will quickly find a need for this program. It is code that you can include at the end of your z80 source code and then call it with a simple JP CodeDump command. When you do this it will show you the values of all the registers when it was called and let you move around memory starting at the value you put in the source code at CD_CurLoc. The only caveat is that you need to be in 32 column mode when you enter it. Any other mode will be hard if not impossible to read.
(I want to apologize in advance, I am not a fantastic writer)
I like to code in machine language. Using ML you have (almost) complete control over the Adam and can make it do things as fast as it is possible for it to do it.
Writing ML code on the actual Adam for me is hard because I have been been using modern computers for so long I am used to being able to cut and paste, have multiple files, compile fast etc. So I like to create my code in Windows, compile it and then transfer it to a disk image for testing in the AdamEM emulator and if I want moving it to the real hardware.
Doing so has involved using my editor of choice (ConTEXT), and then using DosBox to emulate a DOS machine and compiling the code using the TeleMark cross-assembler. On a 32 bit machine I could have eliminated DosBox and just used the Command prompt in Windows, but with a 64 bit machine DosBox is required because TeleMark is a 16 bit program. Once I compiled the program I would then use various methods to get it into an image, mostly WRDISK and sometimes TDOS if I was programming for a CP/M environment but I always felt these were cumbersome so I have been working on a method of creating a disk (or tape) image of the compiled program I am working on and have it just load when I start the emulator (or real hardware). After disassembling the Smart Basic Loader, studying the EOS programmers Guide and banging my head against the wall with disk interleaving I finally was able to create a “simple” process to take my machine language source code, compile it and create a working disk image using just one command.
At some point every programmer has made a “Hello World” program. In Smart Basic this is as simple as:
10 PRINT “Hello World”
Writing one in machine language to use under EOS is a little more convoluted to get started as you have to initialize the Video Display Processor to even see anything. Once you get that setup then you can print to the screen. (Click here to view the source code).
To compile the code use the Assemble batch file. If all goes well and there are no errors you will have a usable disk (and tape) image. If you look at the assemble.bat file you will see how it works:
echo off cls rem This batch file will assemble the source code file rem passed on the command line for example: assemble filename rem where filename is the name of z80 code you wish to rem assemble and has the extension of .asm. Do not add an rem extension. The batch file will use filename for the rem name of the resulting disk and tape images it creates rem Did they pass a filename to assemble? If not then exit if "%1"=="" goto NoFileName rem Do some clean up of old .obj, .lst, .dsk and .ddp files if exist %1.obj del %1.obj if exist %1.lst del %1.lst if exist %1.dsk del %1.dsk if exist %1.ddp del %1.ddp rem Now to assemble the file passed TASM will return an error if rem we could not assemble it and if that happens we will exit tasm -80 -b %1.asm if ERRORLEVEL 1 goto AsmError rem The code assembled ok so now we need to put it in the disk rem image for use with the emulator and a real Adam. If you are rem curious how ImageMkr works just run type imagemkr at the prompt imagemkr %1.obj %1 rem We are all done so lets exit goto Exit :NoFileName echo No file name was passed to assemble goto Exit :AsmError echo Error while assembling if exist %1.obj del %1.obj if exist %1.lst del %1.lst goto Exit rem All done so exit :Exit echo on