WinOSI

Post Reply
lowrybt1
Posts: 214
Joined: Sun Mar 08, 2015 3:42 pm
Location: New York State

WinOSI

Post by lowrybt1 »

Hello,
Is there any way to use the WinOSI emulator to copy files from a 5.25" 65D disk image to an 8" 65D disk image?
C8PDF w. 48K, 2x 520 24K RAM boards and Glitchworks 64K board
OSI 567 Telephony board
Spare 8" drives
Klyball D-13
Mark
Posts: 301
Joined: Tue Sep 16, 2008 6:04 am
Location: Madison, WI
Contact:

Re: WinOSI

Post by Mark »

As far as I know there is no easy way to do that. We don't have a disk image content file manipulation utility yet.
OSI doesn't have a good way of doing that either, See Chapter 12 OS65D Basic Manual, since disk sizes are not compatible, even that won't work.

After thinking about it I realized WinOSI can do it in a round-about way.
Using 5.25" OS65D in WinOSI you could read from disk into memory (LOAD FILNAM), save memory in WinOSI, switch disk sizes in emulator & disks, load memory in WINOSI and write the memory to disk. My OS65D-fu is too rusty to give you commands to do that off the top of my head. PM me if you want to go that route.
(It just occurred to me that BASIC start addresses may be different between 5.25" and 8" disk, which would require different load addresses. BASIC data itself is stored with relative offsets so no need to alter data.)

You can do the following with WinOSI or similar steps on real systems connected via serial port.
For BASIC you could start 5.25" OS65D in WinOSI load program into memory from disk "LOAD FILNAM".
Capture serial output to file in WinOSI (File/Attach Serial Output file), in OS65D change output devices to serial DISK!"IO ,01" & LIST program.
( DISK!"IO ,02" restores normal video output).
Change disk sizes in emu, start OS65D 8", use create utility to make a new file to store data.
Use NOTEPAD or editor to ensure saved data contains no extra lines or commands before start of BASIC text, end it with one extra blank line, then one with a syntax error or "OK" to return control back to OS65D keyboard at the end.
Select saved data file as serial file input source in WinOSI (File/Attach Serial Input File).
In OS65D prepare for new program ("NEW"). Enter DISK!"IO 01" and press Return to change input device.
The data should stream in until a syntax error is encountered. LIST it, play with it, then Save workspace to disk "PUT FILNAM"
TaDa!
( Not too pleasant! )


Disk image file I/O is something I have been thinking about lately. My thoughts were to use bits from OSIHFE which can read/write disk images, convert formats, and list directory contents and enhance it or create something new to extract a file or files from a disk image, or add a file to disk image. Then I thought it might be nicer to have a file manager-like utility with GUI in WinOSI. The first approach would be cross platform compatible, and possibly quicker to finish, but be command-line based.

Since many disk files are BASIC programs which are stored in tokenized BASIC format on disk, it would also be useful to decode BASIC into human readable text and back again. It's not as simple as it sounds as BASIC's token table changes between OS versions as does the load addresses even in the same OS version. Finally what worked best for WinOSI V1.6 was to use the token table found in OSI memory as a best guess. Sometimes tokens are zero'd out or altered, but the decoded BASIC programs are generally correct.

There are many disk formats used by OSI: OS65D, OS65U, HexDos, Dos/65, (picodos, CPM, P-System, Forth, etc.) Each would require their own extraction/addition code, or must prevent write to unsupported disk formats. In addition Plot BASIC, Dos 3.1, 3.2, 3.3, RTOS, OS65U 1.2,1.3,1.4 would all require specialized token conversion to make BASIC data usable between versions! Whew. Just detecting what you have is a chore.

For OS65D:
To extract file data, you have to get directory, match specified filename(s), seek to starting block and save consecutive blocks until file end.
To write file data, you have to read directory, match filename or create new one, map blocks used by existing files and OS, write data to unused consecutive blocks/tracks and update directory entry. You also have to be aware of the hidden sectors of data OSI stored on disks without directory entries like track 0 copier...

Lockett's OSI Disk Dump Utility might be another starting point.

-Mark
Post Reply