Initilizing the Serial Port on a Z180 -- SUCCESS!

63 views
Skip to first unread message

John Monahan

unread,
May 14, 2023, 5:28:14 PM5/14/23
to retro-comp
Thanks to the great help from Wayne Warthen I'm delighted to report that I how have the Z180 S100 board booting up signing on via its serial A port. Thanks Wayne.
I have use the suggested code Wayne put together. It's just a few lines long -- but critical lines.  The problem was I was not having valid RAM.
With the equates its a bit long to list here. So I will add it as a text file.

The remaining challenge is to get the memory setup so the CPU sees 64K of RAM with just the lowest 4K of the ROM moved to E000-FFFFH in that RAM.   This would mirror the configuration of our current Z80 S100 bus CPU boards.  Having a simple monitor like this makes debugging S100 bus new hardware boards much simpler.  Of course with 512K of ROM you can later add all the SC131 stuff and/or more.

OK for memory management Wayne has:-
; z180 MMU setup

ld          a,80H
out0 (z180_cbar),a ; setup for 32k/32k bank config
ld a,(1024 - 64) >> 2
out0 (z180_cbr),a ; common base = last (top) bank

If I understand that,  the bottom 32k is the ROM and the top 32K is RAM.
We need to get things so me move the lowest 4K of ROM to that top RAM at E000H-FFFFH (easy), but them we need to release the bottom 32K of ROM so its all RAM.
This is possible see the attached manual page (Fig 23, Common 0).
The problem is I don't quite know how to do this. Suggestions guys..

John


 


Z180MON0.180
Z180 MMU Page 14.JPG
Z180MON0.HEX

Wayne Warthen

unread,
May 14, 2023, 5:56:39 PM5/14/23
to retro-comp
And here you go...  Updated zip file can be found here: https://drive.google.com/file/d/1yR_zCp9EWk95VR8mfPz1f_zM_JnieEFu/view?usp=share_link

This simply enhances my prior example such that the running code is relocated into RAM at F000H and continues running there.  Once the code relocation is complete, the code then remaps the lower CPU memory space from ROM into RAM such that you now have 100% RAM in the CPU address space.  I included a very simple routine that will allow you to select any 32K chunk of physical memory into the lower 32K of CPU address space (if you want to do any banking).

This code was built using SLR180.  It was tested successfully on my SC130 system which is virtually identical to the design you are using.  There are "test points" scattered through the code.  I use an LED display addresses at I/O port 00h and these test points write to that.  If you don't have this at port 00h, it will do no harm.  Please let me know how you do.

Thanks,

Wayne

John Monahan

unread,
May 14, 2023, 8:50:00 PM5/14/23
to retro-comp
Wayne it worked on the first try!!!! I'm so excited. I really really appreciate the time and effort you put into this.
I and the S100 bus community owe you a big one.  This instantly allows us to splice in the SC131 circuit into the S100 bus and interface the many S100 boards out there -- once I now complete the hardware bridge to the bus.  Hopefully one day the software/hardware can go back and forth between the two groups.
I don't want to "hog" this group with my/our  troubles/progress. If anybody is interested I and others will report progress on the

John

Wayne Warthen

unread,
May 14, 2023, 10:21:07 PM5/14/23
to retro-comp
Very happy to hear it is working.  Hopefully, you are "over the hump" at this point, but please let me know if you need anything further.

Thanks,

Wayne

Reply all
Reply to author
Forward
0 new messages