[Coco] JVC<->MESS OS9 Image Shifter

Andrew keeper63 at cox.net
Sat Jun 9 17:23:47 EDT 2007


All,

I wanted to post a DECB program I whipped up, which is meant to be used 
within the Jeff Vavasour and MESS CoCo emulators (if running the CoCo 2, 
you may need to switch into "ALL RAM" mode), that allows you to take a 
DSDD floppy image (368,640 bytes long) of an OS-9 disk created using 
OS9.EXE, and convert it to allow running it within either emulator.

It detects what kind of image it is (converted for JVC or MESS), and can 
convert the image back before booting it. Note that if you are 
converting the image to MESS, and the image originally had a .DSK 
extension, you will need to change it to .OS9 to allow MESS to boot the 
new image properly.

I created this program using information supplied to me by Robert Gault, 
who described to me the process of getting such an image to work with 
Jeff's emulator. Basically, you need to modify the disk image to change 
the number of sides to 2 to 1, then, prior to booting using the DOS 
command, patch the DOS command so that it points to Track 68 (T34*2). 
Once this is done, the disk will boot in the JVC emulator, but will fail 
to boot in MESS.

The program allows you to easily switch between the JVC and MESS 
formatted images, by using DSKI$/DSKO$ to read and write the appropriate 
bytes on the image. Then (if you want to boot the image) it patches the 
DOS command by modifying a particular byte in memory (***NOTE*** - this 
code is for DECB V1.1 ROMs only - other versions/ROMs may need to alter 
a different byte). As such you should always use a backup of the disk 
image you are converting, in case something occurs and the disk image is 
trashed.

I think this is a handy bit of code that others might find useful.

Thank you, Robert, for helping me to understand how to get this to work!

---

10 CLEAR 1000
20 CLS
30 PRINT at 203,"JVC<->MESS"
40 PRINT at 228,"OS-9 FLOPPY IMAGE SHIFTER"
50 PRINT at 267,"VERSION 1.0"
60 PRINT at 295,"BY ANDREW L. AYERS"
70 PRINT at 389,"CREATED ON JUNE 9, 2007"
80 PRINT at 484,"PRESS ANY KEY TO CONTINUE";
90 GOSUB 530
100 CLS
110 PRINT "PLEASE MAKE A BACKUP OF YOUR    FLOPPY IMAGE BEFORE USE OF 
THIS PROGRAM. THE AUTHOR TAKES NO    RESPONSIBILITY FOR ANY DATA LOSSDUE 
TO USAGE OF THIS PROGRAM."
120 PRINT:PRINT "CONTINUE (Y/N)?"
130 GOSUB 530
140 IF K$<>"Y" THEN GOTO 560
150 CLS
160 DSKI$ 0,0,1,A$,B$
170 SD=ASC(MID$(A$,&H11,1))
180 IF SD=2 THEN GOTO 370
190 REM CONVERT FROM MESS->JVC
200 CLS
210 PRINT "MESS IMAGE DETECTED - CONVERT TOJVC IMAGE OR BOOT (C/B)?"
220 GOSUB 530
230 IF K$<>"C" AND K$<>"B" THEN GOTO 220
240 IF K$="B" THEN GOTO 480
250 A$=LEFT$(A$,&H10)+CHR$(2)+MID$(A$,&H12,LEN(A$)-&H11)
260 PRINT ASC(MID$(A$,&H11,1))
270 DSKO$ 0,0,1,A$,B$
280 CLS
290 PRINT "BOOT THE IMAGE (Y/N)?"
300 GOSUB 530
310 IF K$<>"Y" THEN GOTO 560
320 REM BOOT A JVC IMAGE
330 CLS
340 POKE &HDF1C,68
350 DOS
360 END
370 REM CONVERT FROM JVC->MESS
380 PRINT "JVC IMAGE DETECTED - CONVERT TO MESS IMAGE OR BOOT (C/B)?"
390 GOSUB 530
400 IF K$<>"C" AND K$<>"B" THEN GOTO 390
410 IF K$="B" THEN GOTO 320
420 A$=LEFT$(A$,&H10)+CHR$(3)+MID$(A$,&H12,LEN(A$)-&H11)
430 DSKO$ 0,0,1,A$,B$
440 CLS
450 PRINT "BOOT THE IMAGE (Y/N)?"
460 GOSUB 530
470 IF K$<>"Y" THEN GOTO 560
480 REM BOOT A MESS IMAGE
490 CLS
500 POKE &HDF1C,34
510 DOS
520 END
530 REM KEYBOARD ROUTINE
540 K$=INKEY$:IF K$="" THEN GOTO 540
550 RETURN
560 REM EXIT PROGRAM
570 CLS
580 END



More information about the Coco mailing list