Amiga.org

Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: Rabbi on February 04, 2009, 07:43:52 AM

Title: AmigaZ80 CP/M 2.2 Emulator Question
Post by: Rabbi on February 04, 2009, 07:43:52 AM
I just recently uploaded AmigaZ80 to Aminet.

I was wondering how I transfer archived CP/M files, such as .ark, squeezed, even .zip files over from the Amiga side into the CP/M emulator?

I know how to do ASCII .txt files.  when bringing up the emulator, I enter the -ptr option like this:

Work:Emulators/CPM2.2> amigaz80 -disk a disk.cpm -boot -clock -lpt prt: -banks 16 -tz +6 -ptr RAM:Uploaders.README

Then, once inside the AmigaZ80 CP/M 2.2 emulator, I enter:

pip amigaz80.txt=rdr:

That's fine for ASCII text files, but for executable binaries from my Walnut Creek CP/M CD-ROM, I have to do it different when bringing up the emulator, using the -load option instead of the -ptr option:

Work:Emulators/CPM2.2> amigaz80 -disk a disk.cpm -boot -clock -lpt prt: -banks 16 -tz +6 -load cd7:beehive/utilitys/Unera.com 100
(The number 100h is used for all executable CP/M binaries that I know of)

And then, immediately inside the AmigaZ80 CP/M 2.2 emulator, I enter:

SAVE 4 unera.com

Since the length of unera.com is 1024, 4 in the SAVE command is the number of 256 bytes to save: 4 * 256 = 1024.

This saves the executable binary.

What method would I use for .ARK, squeezed (?q?), & .zip files?  I'd sure like to know because transfers would be faster this way.

The computer I was using before I bought my A1200 was a Timex/Sinclair 2068 with the Portuguese FDD3000 3" (yes, 3", not 3½") CF2 "Flippies" system, which has CP/M 2.2.  I can't wait to transfer all that stuff I have on it to the A1200 with AmigaZ80.
Title: Re: AmigaZ80 CP/M 2.2 Emulator Question
Post by: InTheSand on February 04, 2009, 08:44:42 AM
Go the Z80! Hello from another ex-Spectrum user - was always envious of the TS2068's extra capabilities!!!

I guess AmigaZ80 doesn't provide any access to files stored on the Amiga's filesystem, other than at boot time?

Does it allow access to the Amiga's RS232 port?

And presumably the "-disk a disk.cpm" specifies a virtual "A:" drive using "disk.cpm" as a disk file on the Amiga side? If so, any idea what format these are in? You might be able to find something on the Amiga or PC that'll allow this virtual disk format to be accessed and maybe even written to...

Otherwise, I guess you could give it a go using the same method as for binary executable transfer, though the 100H start address / origin wouldn't be any use there.

Good luck!

 - Ali

Title: Re: AmigaZ80 CP/M 2.2 Emulator Question
Post by: Rabbi on February 05, 2009, 01:52:52 AM
Quote

InTheSand wrote:
Go the Z80! Hello from another ex-Spectrum user - was always envious of the TS2068's extra capabilities!!!

Yes, such as a built-in sound synthesizer chip, not just a "beep", 2 built-in joystick port, & takes cartridges.  I've got a Spectrum emulation cartridge so that I can get Spectrum programs to run on the T/S2068.

Quote

I guess AmigaZ80 doesn't provide any access to files stored on the Amiga's filesystem, other than at boot time?

That is correct, to the best of my knowledge.

Quote

Does it allow access to the Amiga's RS232 port?

I think only with the -lpt option, in that you could assign a serial printer on the Amiga.  But, other than that, I couldn't find anything in the documentation that shows that the AmigaZ80 emulator can access the Amiga's serial port.  That's a bummer because all the CP/M telecommunications software (like IMP), including ham radio packet software, is pointless to use on this emulator.
 
Quote

And presumably the "-disk a disk.cpm" specifies a virtual "A:" drive using "disk.cpm" as a disk file on the Amiga side? If so, any idea what format these are in? You might be able to find something on the Amiga or PC that'll allow this virtual disk format to be accessed and maybe even written to...

Yes to your first question.

I don't know what format it is in, but I would venture to guess it's designed to work only with this emulator in answer to your second question.

I wouldn't count on any other OS systems' emulators virtual drives working for this emulator.  This one's tied to the AmigaZ80  emulator's inner workings - a symbiotic relationship.

Quote

Otherwise, I guess you could give it a go using the same method as for binary executable transfer, though the 100H start address / origin wouldn't be any use there.

I wasn't so clear as to what hex offset I should use.  I'll try 0H instead of 100H.  If that doesn't work, I'll try 100H.

I also want to try porting WordStar .doc files using the -PTR option.  I don't think that there's a CTL-Z until the EOF in WordStar .doc files.  
[/quote]
Title: Re: AmigaZ80 CP/M 2.2 Emulator Question
Post by: Rabbi on February 06, 2009, 02:49:37 AM
Quote

InTheSand wrote:

Otherwise, I guess you could give it a go using the same method as for binary executable transfer, though the 100H start address / origin wouldn't be any use there.



I tried to port over a .ZIP archived file.  I ported it over just like I would a binary .COM file.  The file I used is 16873 bytes in length. This is how I did it in the CLI:

Work:Emulators/CPM2.2>AmigaZ80 -disk a disk.cpm - boot -banks 16 -clock -count -tz +6 -load CD7:Starlet/Zbas.zip 100
(the 100 is 100 hex in the command line)

In the emulator, I entered:
A>Save 66 ZBAS.ZIP
I then successfully UNZIPped it.  The UNZIP progran reported a valid & good CRC.  I completed my testing by running the program, too.

BTW, the formula for arriving at the number used in the above SAVE command is:
(File Length in bytes / 256), then round up the quotient to the next highest integer only if the remainder is not 0.

So, archived files are ported just like .COM binaries.

*BUT*, there's a limit to the file size that you can successfully port over into the emulator.  That file size limit it 65280 bytes, because the biggest valid number that you can use with the SAVE command is 255 (255 * 256 = 65280).