Jump to content
IGNORED

CPM/Z-80 card for the 1090XL -- Calling anyone with Z-80 experience!


Recommended Posts

Here's the register information on the "modern" CP/M card:

 

Z80 CP/M Card For The 1090/1 XL/XE Expansion System (Modern Version)

$D1F0						Z80 CPU Register

Note:  Latches (Bits 0 - 3) are high on initialization.  This will hold the Z-80 Inverted RESET low on initialization.

		Bit 0		Write		Z80 Inverted RESET
		Bit 1		Write		/Z80 INT
		Bit 2		Write		/Z80 BUSRQ
		Bit 3		Write		/Z80 RAM Enable
		Bit 6		Read		/Z80 BUSAK
		Bit 7		Read		/Z80 Service Request

$D1F1						6502 Banking Control

The Z-80 RAM can be directly accessed by the Atari’s 6502 at a bank from $4000 - $7FFF.  This is accomplished by disabling the Z-80 access to the RAM via $D1F0, bit 3, and banking in 16k of the Z-80’s RAM as described below. 

Bit 0		Write		Bank select bit (see below)
Bit 1		Write		Bank select bit (see below)
Bit 7		Write		Bank enable when high (low on initialization)

Z-80 RAM DMA		Bit 7		Bit 1		Bit 0		Hex

Disabled			0		0		0		$00
$0000 - $3FFF		1		0		0		$80
$4000 - $7FFF		1		0		1		$81
$8000 - $BFFF		1		1		0		$82
$C000 - $FFFF		1		1		1		$83

 

  • Like 2
Link to comment
Share on other sites

Posted (edited)
19 minutes ago, reifsnyderb said:

Really?  Is this wrong or is there more to it?

 

https://altairclone.com/downloads/cpm/CPM 2.2/Burcon CPM/Using MOVCPM.pdf

You don't need MOVCPM in your case. Just this:

 

A>sysgen
SYSGEN VER 2.0
SOURCE DRIVE NAME (OR RETURN TO SKIP)A
SOURCE ON A, THEN TYPE RETURN
FUNCTION COMPLETE
DESTINATION DRIVE NAME (OR RETURN TO REBOOT)B
DESTINATION ON B, THEN TYPE RETURN
FUNCTION COMPLETE
DESTINATION DRIVE NAME (OR RETURN TO REBOOT)

You type A as the source drive, B as the destination drive, and then it copies 26 sectors * 3 boot tracks from drive A to drive B. When it's done, you can type another destination drive, or return to jmp 0000H

 

I can assembly a copy of MOVCPM from the original sources if you want, but it's not needed here. Edit: there are no DRI sources. Anyway, it's meant to relocate BIOS etc... to a lower memory location. You don't need that. And if you wanted that, you can just reassemble BIOS, BDOS and CCP for a system with less memory.

Edited by ivop
  • Like 1
Link to comment
Share on other sites

On 5/31/2024 at 9:44 PM, ivop said:

You don't need MOVCPM in your case. Just this:

 

A>sysgen
SYSGEN VER 2.0
SOURCE DRIVE NAME (OR RETURN TO SKIP)A
SOURCE ON A, THEN TYPE RETURN
FUNCTION COMPLETE
DESTINATION DRIVE NAME (OR RETURN TO REBOOT)B
DESTINATION ON B, THEN TYPE RETURN
FUNCTION COMPLETE
DESTINATION DRIVE NAME (OR RETURN TO REBOOT)

You type A as the source drive, B as the destination drive, and then it copies 26 sectors * 3 boot tracks from drive A to drive B. When it's done, you can type another destination drive, or return to jmp 0000H

 

I can assembly a copy of MOVCPM from the original sources if you want, but it's not needed here. Edit: there are no DRI sources. Anyway, it's meant to relocate BIOS etc... to a lower memory location. You don't need that. And if you wanted that, you can just reassemble BIOS, BDOS and CCP for a system with less memory.

I tried that and it didn't work.  On the other hand, the sys.com program I quickly wrote worked perfectly.    🙂

 

 

Link to comment
Share on other sites

Posted (edited)

Ok....as seen from some of my posts, I decided to get CP/M working.

 

While I sent my working prototype card out to somebody else, I decided to assemble and test one of the 10 new 1090XL Z-80 CP/M boards.  It works very well and works exactly the same as the prototype once the prototype had the bodge wires added.

 

After writing a format.com and sys.com program, I created what is most likely the first CP/M boot and system floppy disk for an Atari 1090XL in 40 years.  Here's some pictures.....

 

Here's the floppy disk laying on top of the CP/M board:

 

cpm1.thumb.jpg.010588de7c4b2bdd8717e152f30be62e.jpg

 

Next up is the 80 column display of CP/M running off of the 1090XL's Z-80 CP/M card.  This is after booting up off of the floppy disk in a system that has two physical floppy disks.  Drive B: was formatted and the system was written to drive B:.  A follow-up test showed that this system is capable of formatting and making new boot floppy disks.   🙂

 

cpm2.thumb.jpg.e57a78a2ec90c8675a8939ff83457d25.jpg

 

Here's the front of the new 1090XL CP/M board:

 

cpm3.thumb.jpg.c659d5348a6877ea03e2f338c6961f2d.jpg

 

 

Here's the back of the new CP/M board.  Note the lack of bodge wires!

 

cpm4.thumb.jpg.a43249cae400c9fd0ad7b98f4c43ff70.jpg

 

 

I suppose a disk copy program would be needed.  Also, printer support has yet to be added and I don't know if WordStar would run. 

 

I've open-sourced all of the code I've written and the source code is available for almost everything else.  (There may be some CP/M utilities

whereby the .asm or C source isn't available.  I don't know.)

 

The source code I've released is well documented and should be easy for a developer to make improvements to.

 

Oh, yeah, here is the source code for sys.com:

sys.c

 

Neither format.com or sys.com are too forgiving if you do something dumb.  i.e.  You could probably format your own

boot disk, for example.  Also, sys.com, as written, requires at least a 2 drive system.  As written, it buffers the system

sectors in memory so it would be easy to add a prompt to change disks prior to writing the system to another disk.

 

 

 

Edited by reifsnyderb
  • Like 7
  • Thanks 2
Link to comment
Share on other sites

Posted (edited)
1 hour ago, reifsnyderb said:

I tried that and it didn't work.  On the other hand, the sys.com program I quickly wrote worked perfectly.    🙂

Good that you got that to work! But how did sysgen.com not work? What happened? Did you use the one I specifically assembled for you and posted earlier in this thread? That's the one I just ran again under emulation and should work. So I'm curious what happened exactly.

Edited by ivop
  • Like 1
Link to comment
Share on other sites

Posted (edited)
16 minutes ago, ivop said:

Good that you got that to work! But how did sysgen.com not work? What happened? Did you use the one I specifically assembled for you and posted earlier in this thread? That's the one I just ran again under emulation and should work.

I thought I used the one you assembled, but it's been weeks since I put together a "utils" ATR image.  The version I used gave me two prompts then booted me back to the command line.

 

I should have a working diskcopy program soon.  Copying these files, on a one by one basis, sucks.

Edited by reifsnyderb
Link to comment
Share on other sites

10 minutes ago, reifsnyderb said:

I thought I used the one you assembled, but it's been weeks since I put together a "utils" ATR image.  The version gave me two prompts then booted me back to the command line.

That's weird. It is a program that's a bit finicky about the keys you press though. It might be that you pressed enter on the wrong moment and got it to either not read the sectors from disk but use the what's at 0900H in memory (a mechanism used to write a modified image to disk), skip writing and exit, or both. It's important though that you use the one I specifically assembled for 26 sectors per track and 3 boot tracks. Any other sysgen for a different system won't work. Anyway, with your sys.com it works for now. We could revisit sysgen later.

10 minutes ago, reifsnyderb said:

I should have a working diskcopy program soon.  Copying these files, on a one by one basis, sucks.

To copy all files from B: to A: you can do: PIP A:=B:*.*

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

8 minutes ago, ivop said:

That's weird. It is a program that's a bit finicky about the keys you press though. It might be that you pressed enter on the wrong moment and got it to either not read the sectors from disk but use the what's at 0900H in memory (a mechanism used to write a modified image to disk), skip writing and exit, or both. It's important though that you use the one I specifically assembled for 26 sectors per track and 3 boot tracks. Any other sysgen for a different system won't work. Anyway, with your sys.com it works for now. We could revisit sysgen later.

To copy all files from B: to A: you can do: PIP A:=B:*.*

 

I figure that, for the short term, it's best to just get it working.  Over time, everything can be improved.  If there are some developers that want to work on this, there is potential.  Once I get the diskcopy program working, the floppy disk will be easy to save to an ATR image.

  • Like 1
Link to comment
Share on other sites

Well, it's not the most elegant code, but it works.  Here is the source code to diskcopy....

 

diskcopy.c

 

I am not too worried about the size of the code....just that it works.  Other than basic input handling, there is no error checking.  It can be made elegant later on.   🙂

 

I just tested this out and was able to copy my floppy disk from one 1050 to a floppy disk in another 1050.  So, CP/M can now duplicate itself using real hardware and real floppy disks.   🙂

 

 

 

  • Like 6
Link to comment
Share on other sites

Brian, are you going to post the bootable system disk somewhere in this thread or did you already and I missed it?  I have to go in to the hospital for a second stent this Friday, but I intend to set up and start working on a development environment while recuperating from that operation. 

Once I'm recuperated, I'm taking a flight to Portland with my wife to see our daughter and granddaughter. When i get back, I want to see what else can be done with the CPM and 80 column card.  If other people can get VGA out of a RP2040, I think an Atari should be able to also.  I'm thinking repilcating a full color terminal and full VGA 80 column and graphics support should be possible if maybe a bit slow (at least with my poor coding skills). 

Unless, of course the stent procedure fails...the doctor did keep refering to it as a roto-router procedure due to the calcification.  It all sounds very sci-fi to me.  

  • Like 2
Link to comment
Share on other sites

They will snake the stent into place via either the wrist or leg, both sites are normally prepped at the same time. If there is a problem, they choose the other route to complete the procedure. Between thinners, statins, and success - You'll probably be out and about in no time (figuratively). I don't envy the easier bruising and other things that come with it. Sounds like your not new to it since your in for your second. Barring some other issue I'd expect you're taking it easy for a bit and letting us know how much better your feeling and doing :)

  • Like 1
Link to comment
Share on other sites

The first time they went throught the wrist but they did prep both locations.  This time they want to go through the leg because they want the heavier duty roto-rooter tool.  The first time was more high energy as they were in emergency mode (my wife said they grabbed the gurney and took off running.  I imagine the MASH theme playing in the background!) The second round will be on their time schedule.

But we are here to talk about CPM on the Atari,  What amazing times we live in where we can resurrect something that Atari gave up on in 1984!  The 1090XL is more of a Zombie than I am, LOL!

  • Like 2
  • Haha 1
Link to comment
Share on other sites

3 hours ago, Geister said:

Brian, are you going to post the bootable system disk somewhere in this thread or did you already and I missed it?  I have to go in to the hospital for a second stent this Friday, but I intend to set up and start working on a development environment while recuperating from that operation. 

Once I'm recuperated, I'm taking a flight to Portland with my wife to see our daughter and granddaughter. When i get back, I want to see what else can be done with the CPM and 80 column card.  If other people can get VGA out of a RP2040, I think an Atari should be able to also.  I'm thinking repilcating a full color terminal and full VGA 80 column and graphics support should be possible if maybe a bit slow (at least with my poor coding skills). 

Unless, of course the stent procedure fails...the doctor did keep refering to it as a roto-router procedure due to the calcification.  It all sounds very sci-fi to me.  

Hello!

 

I haven't posted a bootable system disk yet.  It will be posted soon, though.  I am looking forward to seeing what you can do with the CP/M card.   🙂

 

VGA should be possible.  I'd find the Rasp Pi Pico sources, for the XEP-80, and I think there is a VGA Rasp Pi Pico project somewhere as well.  I suspect the two could be combined to have an 80 column VGA card.

 

Hopefully, the stent procedure will go well.

 

Best Regards,

 

Brian

 

Link to comment
Share on other sites

2 hours ago, Geister said:

The first time they went throught the wrist but they did prep both locations.  This time they want to go through the leg because they want the heavier duty roto-rooter tool.  The first time was more high energy as they were in emergency mode (my wife said they grabbed the gurney and took off running.  I imagine the MASH theme playing in the background!) The second round will be on their time schedule.

But we are here to talk about CPM on the Atari,  What amazing times we live in where we can resurrect something that Atari gave up on in 1984!  The 1090XL is more of a Zombie than I am, LOL!

When you mentioned the MASH theme playing, I started thinking about bad it would be if Frank Burns was the surgeon.   🙂

 

 

  • Like 1
Link to comment
Share on other sites

Posted (edited)
27 minutes ago, AtariGeezer said:

Crap, I started my buy of the 1090 board and the z80 card in my cart and was finalizing the order and just as I was selecting the payment option, the webpage reset and the last 2 cards were gone :(

I just checked and my current supply of board are sold.  I'll order another batch of 10 from jlcpcb tonight.  I should have more in stock next week.

Edited by reifsnyderb
  • Like 2
  • Thanks 2
Link to comment
Share on other sites

1 hour ago, reifsnyderb said:

I just checked and my current supply of board are sold.  I'll order another batch of 10 from jlcpcb tonight.  I should have more in stock next week.

Cool, thank you :)  I just bought the 1090XL Modernized Reproduction Main Board + Cards from your site :)

Do you have more Z80 CPU's on hand?

Link to comment
Share on other sites

3 minutes ago, AtariGeezer said:

Cool, thank you :)  I just bought the 1090XL Modernized Reproduction Main Board + Cards from your site :)

Do you have more Z80 CPU's on hand?

Thank you!  I have several Z-80's available.  If need be, I may be able to get some more in the future.

  • Like 1
Link to comment
Share on other sites

Posted (edited)

Well....I was planning on starting to ship Z-80 CP/M boards tomorrow.  More parts came in today and I am soldering them in place.  The first bad news was I accidentally ordered 74LS645's in surface mount as opposed to DIP packages.  🤬  Then, I forgot to order 74HCT04's.  🤬

 

So, all of that is ordered and more.  First Z-80 CP/M boards should be ready to ship by Monday.  I'll post progress pictures later on today.  :-D

 

More bare boards have been ordered, are finished up, and should be shipped my way within a chinese business day....or whenever DHL picks up.  Then, it takes about 3 to 4 days until the DHL van rolls up.  So, I'll be putting out ten more Z-80 CP/M boards next week sometime.

 

Thank you all for your support!   🙂

 

 

 

Edited by reifsnyderb
  • Like 7
Link to comment
Share on other sites

Here's the progress on the Z-80 CP/M cards.  There are ten Z-80 CP/M cards and the top one in front is mine.  The other Z80 CP/M cards need chips, shunt resistors, and some need a 6.8k ohm resistor which should be here tomorrow.

 

Also shown are some 1090XL boards that are going to be shipped out, an 80 column HDMI card, a CX-85 numeric keypad card, some 320k cards, and a replica of an Atari 64k card.

 

z80cardsandothers.thumb.jpg.248c3fffc14363dbccbc6e38554c295e.jpg

 

I plan to start shipping out the CP/M cards on Monday.....due to my own ordering mistakes.  The 1090XL packages will ship out shortly thereafter.

 

 

 

 

 

 

 

 

  • Like 8
  • Thanks 1
Link to comment
Share on other sites

Posted (edited)

Here's the ATR image for version 1.0a of the CP/M boot disk for this card.

cpm10a.atr

 

This disk requires the 1090XL and the CP/M card, at a minimum.  The 80 column card is nice because CP/M appears to like 80 column displays better. 

 

On the disk are the following programs and utilities:

asm.com

ddt.com

diskcopy.com

dos2copy.com

dos2dir.com

dump.com

ed.com

format.com

load.com

mac.com

pip.com

stat.com

submit.com

sys.com

 

I'll have to get a .zip file together with all of the available source code and post that soon.

 

Note:  The CP/M BIOS does not yet support printers nor properly handling an interrupt.  Hopefully, once the cards are all shipped, some developers will start enhancing the BIOS, I/O code, utilities, etc.

 

 

On another note:  I just ran a quick, successful, test of one of the 9 new CP/M Z-80 cards.   🙂

 

 

 

Edited by reifsnyderb
  • Like 8
  • Thanks 1
Link to comment
Share on other sites

11 minutes ago, Geister said:

I wonder if the software for the new ATR8000 can be recompiled for the 1090 CPM card.  Atarimania is going to have to add a CMP section.

Any software that doesn't require specific I/O registers, and only goes through the CP/M BIOS, should be compatible.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...