• Please review our updated Terms and Rules here

Getting started with Z80 assembly language on an Exidy Sorcerer.

flibbledeedo

Member
Joined
Sep 19, 2018
Messages
29
Hey folks.

Thanks to dave_m's hard work restoring my systems, I now have an Exidy Sorcerer with CPM floppy drives and I am wanting to get going learning Z80 assembly language.

I'm a fairly experienced programmer but not with assembler.

My question is, does anyone have any opinions about the most effective development workflow and development tools for Exidy Sorcerer?

Am I best off doing the development on an actual machine or on an emulator? Is there an emulator around that is good for doing Sorcerer development? I have seen at least one that does Sorcerer software/games - maybe that's the best place to be doing the development?

What tools should I use? I can see an assembler on one of the CPM disks that I have - so I guess the raw capability is there for doing assembler, but maybe there are better, more modern options?

I wondered if maybe I should use one of the modern Windows IDEs that are set up for doing ZX Spectrum Z80 or Amstrad Z80 development/emulation, do the main chunk of development there, and then somehow do the Sorcerer specific code actually on the Sorcerer?

It looks like it could be really painful to be using the tools from the 1970's and whilst I want to get up to speed I'd like to do it in the most time effective and painless manner.

Any insights valued. I'm also curious to know if there is anyone really who does any Sorcerer development here in 2018 soon 2019!

thanks!

Andrew
 
I've been going round in circles for days with the same questions, trying different emulators then different assemblers with lots of iterations. I won't detail all the steps but in the end I've got the MYZ80 emulator running CP/M 2.2 on an XP machine.

MYZ80 has IMPORT and EXPORT commands built in for copying to/from the host filesystem so it's been fairly simple to import the Z80ASM assembler plus other tools from here - http://s100computers.com/Software Folder/Assembler Collection/Assembler Collection.htm. Notepad++ on the XP box is good for hand editing then it's just a case of IMPORTing the code to MYZ80, assembling to a HEX file then EXPORTing that back to XP. Takes seconds.

With a cable hooked up to the XP machine's serial port it's a simple matter of booting the Sorcerer to the monitor, typing SE T=2 to set the I/O to 'serial, 1200 baud' then booting CP/M and using PIP to receive the HEX file onto a floppy - PIP B:TEST.HEX=RDR:
On the XP box I use RealTerm to send the hex file down since it's fully configurable with byte send delay etc. When the code has finished transmitting you type EOF (CTRL-Z) in RealTerm and the Sorcerer writes the disk file which you can then LOAD from CP/M.

Easy :eh::lol:
 
Development for the Sorcerer is still in my incredible long TODO list but as it's similar to other platforms my recommended setup (of course to cross develop) is something like:

- Notepad++: Very powerful editor with a lot of plugins and syntax highlighters. Aanyway, there're tons of them out there (UltraEdit, PSPad, ConTEXT, etc.)
- sjasm Z80 assembler: It has everything you'll need from a macroassembler; but also, a very wide range of tools to choose (pasmo, tniasm, etc.)
- MESS emulator: The Sorcerer emulation is quite good and it has some nice features like sending commands to the emulated machine right after booting up (not sure if the Sorcerer drivers supports this tho...).

If you want to try also with C, you can develop more or less easily thanks to Z88DK. It has the Sorcerer as one of their targets and works pretty well.

Development over the Sorcerer itself could be more a challenge than a pure development task; but it can be also a lot of fun.
 
I use TASM and Notepad++ on s PC, then Kermit to transfer the binary to the CP/M machine for test.

Would love to do it all on the machine but I haven’t found a usable text editor for it (and so one of my projects was a port of vi)..
 
Cool!, I've recently seen some vi CP/M ports, (one of them being pure CP/M and the other a MSX-DOS one, very close to the CP/M). The pure CP/M port is still too big when compiled and leaves not too much free mem; but hey, it can be used with sources around 20KB; about the MSX version I can't remember the details, it must be smaller for sure as it only implements part of the original VI features.

How big is your vi? :)
 
The COM file is 26K. It's a port of STEVIE by the way, not my own work. And really, really, really slooooooooowwwww.....

Could you post some links to the other CP/M vi clone sources please? I know there's one that Udo Monk was working on, not sure the current state but it's on Github: https://github.com/udo-munk/s

No idea if it works.
 
That's it, it's the Udo Munk's vi port, suposedly it weights about 35KB...

The other must be faster enough as it runs on MSX machines: MSX-VI. The price to pay is a somewhat limited feature set.
 
If it is faster it's because it isn't implementing double buffering like STEVIE does. Those routines are sloooow even when rewritten in machine code. MSX-vi also has no "undo" feature.

MSX-vi benefits from having the UDP (screen display chip) for output - it might be that its screen memory in text mode can be addressed directly. This would be way faster than going via CONOUT (as STEVIE does).

For example, on the Superbrain, the screen RAM is memory mapped so you can access it directly. Yet I think the problem (for STEVIE) is the double buffering. Not sure if Udo's s editor does this or not.

[edit: I had a play with it in the online MSX emulator and yes, it's quicker (much quicker) than STEVIE. However it doesn't implement line wrapping but scrolls everything to the left, so when you start to enter characters after column 80 on a line it does slow down due to screen refresh. It is usable, though.]

Apologies to the OP for going off topic.
 
Last edited:
jonb said:
I use TASM and Notepad++ on s PC, then Kermit to transfer the binary to the CP/M machine for test.


Last night I discovered one of the few machines not to have a Kermit port is the Sorcerer...
 
Last night I discovered one of the few machines not to have a Kermit port is the Sorcerer...[/COLOR]

Reading through SCUA newsletters the go in the Oz was STERM (Serial Terminal) by Bob Stafford (also known for the EzyFile and CADAS databases and porting FIG-FORTH to the Sorcerer). It supports XMODEM and YMODEM.

Someone will have a disk somewhere ...
 
I have been loaned a disc with STERM on it. The disk was created using the Australian-developed Dreamdisk controller and we are still working to understand the geometry of Dreamdisk discs when the controller is used with a Sorcerer.

So far we have been able to retrieve a directory listing using cpmtools which is shown below:

Code:
C:\cpmtools>cpmls -f sorcerer1 -T dsk jim2.dsk
0:
-utils.003
165.com
165.mac
166.com
166.mac
b14.com
bright.com
bright.lst
bright.pic
bright2.com
cbug.com
cir1.dat
cir2.dat
cir3.dat
cm.com
compare.com
config.com
cp.com
cpm3cat.lbr
crc.com
crcklist.crc
cref80.com
cross.com
d.com
debug.com
demo.dat
diff.com
disilog.com
distap4.com
ed.com
io5.bak
io5.com
io5.mac
l.com
l80.com
m80.com
mdump.com
micromon.com
op.com
op.mac
pic.com
ports.dat
print.com
prn.com
prna4.com
pset.com
screen.dat
sd80.com
sdraw.$$$
sdraw.com
sdraw.mac
show.com
sid.com
sp.com
sterm.com
sterm12.lbr
stermf.com
subit.com
subit.dqc
sweep.com
sweep.doc
tapdis4.com
test.com
vedit.com
vv.com
xlate2.com
z8a.com

The object and source code for STERM (which should be in the .lbr) should prove valuable for transferring other essential Sorcerer specific CP/M software from disk.

Examination of the .dsk image in a text editor gives a glimpse of the capabilities of the program:STERM_MAIN_MENU.jpgSTERM_UART.jpg
 
May I ask what your sorcerer1 definition contains? Also, do you have a file of the jim2.dsk or jim2.img that you can email me?
And is the .dsk just a sector dump of the floppy? Can you use Linux's dd command to read the floppy contents to a file?

Assuming you are a member of group floppy......and the floppy is /dev/fd0
$dd if=/dev/fd0 of=/home/user/path/to/image/file/jim2.img conv=notrunc

Thanks.

Larry
 
Hi Larry,

I emailed you a couple of disk images a while back for your examination, both taken using different tools on my Sorcerer, the flop2pc utility I'd ported and Dave Dunfield's CPT. Did you get them?
 
May I ask what your sorcerer1 definition contains? Also, do you have a file of the jim2.dsk or jim2.img that you can email me?
And is the .dsk just a sector dump of the floppy? Can you use Linux's dd command to read the floppy contents to a file?

Assuming you are a member of group floppy......and the floppy is /dev/fd0
$dd if=/dev/fd0 of=/home/user/path/to/image/file/jim2.img conv=notrunc
I really appreciate your passion Larry and I know you would add value but to be fair to my collaborators who have already invested so much time I must ask you to give us a little breathing space in which to develop more confidence in our findings :)
 
May I ask what your sorcerer1 definition contains? Also, do you have a file of the jim2.dsk or jim2.img that you can email me?
Hi Larry,

We believe we have figured out the geometry and have been able to extract all the files listed in the directory higher up in the thread. I don't believe this has been done before for a Dreamdisk floppy controller on the Sorcerer. Unfortunately I can't share the image as it contains some personal files.

Definition is below:

Code:
# Sorcerer Dreamdisk 5.25" DS DD 80T (5.25" DS HD 80T 5x1024 s/t)
diskdef sorcerer1
seclen 1024
cylinders 80
sectrk 5
heads 2
blocksize 2048
maxdir 256
skew 1
skewstart 1
datasect 1
boottrk 2
sidedness 1
os 2.2
end
 
For you and your collaborators........GREAT JOB! That was also my goal for you, even if I was stepped on your toes.

I'm GLAD you have the Files you need.

THANKS for the update

Larry
 
...and here's the result of @exidyboy plus collaborators' efforts - a working copy of STERM running on my Sorcerer!

IMG_6388.jpgIMG_6389.jpg

Tonight I'll attempt a file transfer, watch this space!
 
...success! 10 days ago I sent a game over to my host PC using XMODEM, tonight I sent the same game up to the host using STERM and got exactly the same file at the other end. Result! STERM does a 'multiple file transfer' which could be interesting.

I also got my VSG from Mike Douglas tonight too so over the weekend I'll be able to copy my disks onto soft sectored ones...excellent.
 
As is usual with these things Real Life(tm) got in the way along with a Tandata PA which is rare as hens' teeth, but anyway...

2 days ago I got the VSG running reliably. The big problem I had was the belt-driven Micropolis drives with my Sorcerer seemed to have a reliability issue with timings so I'd been trying to find a suitable direct drive unit and eventually found the Mitsubishi MF504C. The big issue was the READY signal on pin 34 which is used differently on IBM compatible drives so I had to find one old enough to still be jumperable to send READY instead of DISKCHANGE.

Should anyone else come across this post the jumper settings needed are:

MS - motor controlled by Drive Select
IU - LED lit by logical sum of Drive Select and In Use
RI - Index pulses gated by Ready signal
SR - Standard Ready on pin 34
SS/ND - force 300RPM
DS0 (normally, I’m set to DS2 for this)

This will quite happily boot my CP/M 2.2 disk so the next stage is to attempt a Gotek floppy emulator...
 
Witchy,
I'm curious if you are going to use the HxC or FlashFloppy Firmware? Is your GOTEK a 720 or 1.44 Model?

Also, the MF504C manual states "300rpm when I/F Pin 2 is Low Level". Does your FD Controller actually use Pin 2,
or do you have it strapped "LOW"? Most of the older Floppy Controllers that I've used don't have Pin 2 used for
the Floppy Interface. Just curious about the Sorcerer.

Thanks.

Larry
 
Back
Top