[Coco] Coco flash
barry.nelson at amobiledevice.com
Tue Feb 7 02:29:06 EST 2017
> Henry Rietveld rietveldh at hotmail.com
> Mon Feb 6 17:11:18 EST 2017
> I want to order the CoCo Flash from RETRO Innovations
> Can someone tell me what's involved in putting rom pak images on it. What format are the images in that I would use?
> I have seen Barry's demo on youtube but it doesn't show what's involved to load the games on the flash.
The software for writing to the card, including source code is available here: https://drive.google.com/open?id=0B8RnV5G0TZFZTFVlVHlWVHRreTg <https://drive.google.com/open?id=0B8RnV5G0TZFZTFVlVHlWVHRreTg>
I believe it is up to date. The main file you want is PRGFLASH.DSK. This software expect to load a .BIN file at address &H4000 and can program up to 16k at a time. To program ROMs large than 16k, you must break them into 16k chunks and program them into consecutive banks in the flash. Your card should come preloaded with a special version of DriveWire HDBDOS that auto detects between a CoCo 1/2 and a CoCo 3, an Orchestra 90 rom, and a few games that have been released to the public for free download. I have not finished writing the manual yet. The rom files can be programed from a real disk or CoCo SDC in slot 4 with the CoCo Flash in slot 1 of an Multi-Pak, or if you don’t have a Muti-Pak, just plug the CoCo flash into the side of your CoCo and use the preloaded DriveWire HDBDOS to run the programming software. To update the menu which is actually written in BASIC and converted to load from ROM, load the ECB MENU.BAS program off the PRGFLASH disk image and edit the data statements a lines 10000-11000. The first piece of data is the name of the ROM to appear on the menu, next is a number indicating the flash rom bank number that is to loaded at &HC000, then another number indicating the loading flag options. Valid typical values for the last number (the loading flags) are below.
0 ROM is a Disk BASIC DOS ROM
2 ROM is a normal 2k, 4k, 8k, 16k or 32k (CoCo 3 only) game rom. For 32k CoCo 3 roms the starting bank number for the menu program data is the starting bank of the 2nd 16k segment or the middle of the ROM image. If you don’t understand this you can contact me for further details. Don’t worry about this for any other ROM type.
34 ROM is a banked ROM, such as the RoboCop or Predator game ROMs.
The final data statement in this BASIC program must contain “”,-1,-1. Note that if you add more than 50 entries in the menu program you will need to edit the DIM statement in line 10 as well.
Once the MENU.BAS file is updated, first save it normally, then
This will create a file called BASROM.BIN. Use the PRGFLASH.BAS program and write that BIN file to bank 0, as banks 0 and 1 are reserved for the menu.
I have included a listing of MENU.BAS below. I am sure this is all as clear as mud, so I will try to answer any questions you may have and will even talk you through programming some files by phone if necessary. All source code is available and if someone wants to write a fancier programming and menu system my daughter and I will try to assist them with the understanding that if they accept our help or use our source code that their software should be released free for public use. The current source code including the menu program below is copyrighted by my daughter and I, and is licensed for free public use under the GPL. Refer to the file LICENSE.txt in the google drive folder above for license details.
1 PCLEAR 1:CLEAR 500:CLS
7 GOSUB 200
10 DIM P$(50),B(50),C(50)
20 P=1:PRINT STRING$(32,166);:PRINT @480,STRING$(31,166);:PRINT @32,"";:POKE TSCR+511,166
30 READ P$(P),B(P),C(P):IF B(P)>0 THEN P=P+1:GOTO 30 ELSE P=P-1
32 FP=1:LP=P:IF LP>12 THEN LP=12
35 A$=">>> COCOFLASH MENU <<<":PRINT TAB(INT(16-(LEN(A$)/2)));A$:FOR X=2 TO 15:PRINT @(X-1)*32,CHR$(166);:PRINT @X*32-1,CHR$(166);:NEXT X
40 FOR X=FP TO LP:PRINT @(X-FP+2)*32+1,RIGHT$(" "+STR$(X),4);")"+P$(X);:NEXT X:PRINT @(X-FP+2)*32+31,CHR$(166);:PRINT @(X-FP+2)*32+1,"";
50 INPUT "SELECTION(P=PREV,N=NEXT):";S$:S=VAL(S$):IF (S<1 OR S>P) AND S$<>"N" AND S$<>"P" THEN RUN
52 PRINT @(X-FP+2)*32+31,CHR$(166);
55 IF S=0 THEN GOTO 100
57 SLOT=PEEK(&HFF7F) AND &H33:IF (C(S) AND 32)=0 THEN SLOT=SLOT OR &H03
60 H=INT(B(S)/256):L=B(S)-H*256:POKE &HFF00+BA+2,H:POKE &HFF00+BA+1,L:POKE &HFFDE,0:POKE 113,0:POKE &HFF00+BA,C(S):POKE &HFF7F,SLOT:EXEC PEEK(&HFFFE)*256+PEEK(&HFFFF)
100 IF S$="P" THEN FP=FP-12:IF FP>=1 THEN LP=LP-12 ELSE FP=FP+12
110 IF S$="N" THEN FP=FP+12:IF FP<=P THEN LP=LP+12 ELSE FP=FP-12
120 IF LP>P THEN LP=P
130 IF LP<FP+11 AND FP<=P-11 THEN LP=FP+11
140 FOR X=2 TO 14:PRINT @(X*32)+1,STRING$(30,32);:NEXT X:PRINT @65,"";
150 GOTO 40
200 P=PEEK(&HFF80):POKE &HFF80,&H55:POKE &HFF80,&HAA:POKE &HFF80,&H21:POKE &HFF80,&H01:POKE &HFF80,BA:RETURN
10000 DATA "DRIVEWIRE HDBDOS",2,2,"ORCHESTRA 90",7,2,"DOODLE BUG",9,2,"BUZZARD BAIT",13,34,"TEMPLE OF ROM",21,2
10999 DATA "",-1,-1
60000 CLEAR 30,&H3F80
60040 T=&H4800:FOR X=S-1 TO E:POKE T,PEEK(X):T=T+1:NEXT X
60050 SAVEM"BASROM",&H4000,T,&H4000:PRINT "LENGTH=";T-&H4000;" ";INT((T-&H4000)/1024+1);"K"
More information about the Coco