RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » Interested in a Z280 SBC (Z280 SBC retrobrew (CPU280 Revival))  () 1 Vote
Re: Interested in a Z280 SBC [message #5152 is a reply to message #5140] Sat, 08 September 2018 19:32 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 866
Registered: March 2017
Location: New Mexico, USA
Senior Member
hperaza wrote on Sat, 08 September 2018 05:34
plasmo wrote on Fri, 07 September 2018 18:49
Why can Z280RC handles 132 data packet from PC but not the same data packet from Linux machine is puzzling.

Just did a quick test: switched the terminal program to use 2 stop bits (8O2) instead of 1, and XMODEM now works without having to insert any additional inter-character delays. Back to 1 stop bit and all I get is a bunch of "Retry 0: NAK on sector" as before. I guess that 115200 is just at the edge of what XMODEM+CP/M can handle. Minor variations of the clock frequency could explain why it works with your PC but not with mine.


Running XMODEM with 2 stops is interesting. I tried that and measured the serial data stream from PC to Z280RC; each packet is now 13.75ms and there are hardly any jitters in the duration of the data packet. 13.75ms is exactly the time for 132 bytes of data at 115200 8o2 and PC seems to be able to send all data without any idling between characters.

For next experiment, I kludged in a 1.84MHz clock to the UART so I can change the CPU clock without affecting the serial baud clock. I lower the CPU clock from 29.5MHz to 24MHz and I still can transfer data with XMODEM without any problem. So I don't think Z280RC is barely fast enough to run XMODEM at 29.5MHz.

There is something different about XMODEM on Linux but 2 stops may be an interim fix.

Bill

Re: Interested in a Z280 SBC [message #5153 is a reply to message #5150] Sat, 08 September 2018 19:42 Go to previous messageGo to next message
lowen is currently offline  lowen
Messages: 226
Registered: August 2016
Location: Western NC USA
Senior Member
Now, I did start my statement with "back in the day" or at least words to that effect. Smile

For the TRS-80 case specifically, the limits had as much to do with the IRQ setup in that hardware as anything else. That and floppy I/O, which was NMI driven programmed I/O. For direct text to the screen, the frame buffer was memory mapped and required software scrolling and remapping. Oh, and the software-scanned keyboard, with timer IRQ driven typeahead....

So, while the Z80 might have been able to run those speeds, it only could do that if it had nothing else to do, at least in the TRS-80 case. I don't remember any of the file transfer programs doing RAM buffering of downloads, but I do remember doing downloads into RAMdisk to keep the transfer rates up. But the keyboard scan task alone used up many cycles, and that would be present just to be able to hit the BREAK key to interrupt the transfer....

These modern Zx80's are much nicer machines, and leave the TRS-80's in the dust in many ways.


--
Bughlt: Sckmud
Shut her down Scotty, she's sucking mud again!
Re: Interested in a Z280 SBC [message #5154 is a reply to message #5144] Sat, 08 September 2018 20:03 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 866
Registered: March 2017
Location: New Mexico, USA
Senior Member
wsm wrote on Sat, 08 September 2018 10:34
With all this discussion about data rates, I'm going to be a bit of a devil's advocate. The default speed I use on my Z180's is 115,200 to/from Win7/HyperTerm and I've never had an issue. That got me thinking about how fast a very basic 4MHz Z80 could handle XMODEM data. My conclusion is that 115,200 should NOT be a problem nor should 230,400. The 10MHz SIO should support 115,200 and I'd have to look at other UARTs for 230,400. The only assumption is that the UART has both a data register and a receive register i.e. additonal data can be received while valid data is still pending a read.

The real key is the software. While the original XMODEM certainly works it is *FAR* from optimized code with a subroutine call and extra logic PER BYTE. By definition, the XMODEM protocol has a built-in handshake to limit data flow and the sender should not be sending any additional data after a packet until it receives an ACK or NAK. The only real timing issue is with the receipt of a 132 byte packet.

The following snippet shows how a 4MHz Z80 can get a serial data byte in 15.5uS or 23us if the status check just misses the change and causes an extra loop. By my calculation, that equates to 43,478 Bytes/sec worst case. At 8,N,1 that's 434,782 baud!

Perhaps someone can show me why my theoretical calculations are wrong.



The XMODEM is version 2.7 by Martin Eberhard.
https://groups.google.com/forum/#!searchin/comp.os.cpm/xmode m%7Csort:date/comp.os.cpm/qLgOkknsnO8/zZZhO7L_AwAJ

The source code is attached below. Alas, it is in 8080 assembler and I'm afraid to read it because it will surely muddle my already tenuous grasp of Z80 assembler.
Bill

Edit: This is Martin Eberhard's comment when he released version 2.6 of XMODEM:
https://groups.google.com/forum/#!searchin/comp.os.cpm/xmode m$202.6%7Csort:date/comp.os.cpm/XVjRHuzT5jc/L1ogAJXjCQAJ

Version 2.6 is a pretty significant rewrite, focused on speeding up transfers. By far the biggest speedup came from changing the CRC calculation to a table-driven algorithm. But I also flattened the code a bit, eliminating several layers of subroutine calls, as well as a few other speed enhancements. The resulting code can now send and receive at 76.8K baud with a 2 MHz 8080. It can theoretically go twice as fast with a 4 MHz Z80. However, I was only able to test it at 115.2K baud on my 4 MHz Z80 machine, since this is the maximum baud rate for the Z80-DART. (Still this is more than 3 times as fast as version 2.5!)

  • Attachment: XMODEM_27.zip
    (Size: 25.88KB, Downloaded 411 times)

[Updated on: Sat, 08 September 2018 20:07]

Report message to a moderator

Re: Interested in a Z280 SBC [message #5155 is a reply to message #5154] Sat, 08 September 2018 20:58 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 866
Registered: March 2017
Location: New Mexico, USA
Senior Member
Circling back to hperaza's original comments that started this flurry of conversation:
1. CF byte-swap is still a problem although if XMODEM transfer at 115200 can be reliably achieved, the need of moving CF disk back and forth between PC & Z280RC may not be so pressing. In view of the number of existing Z280RC hardware out there, I want to find a software solution. I'm still thinking about byte swapping in Z280 software or use CF interface in 8-bit mode and enable DMA to make up for the lost performance.
2. The discussion on UART hardware handshakes are instructive. Initially I thought about bring out two discrete I/O from CPLD as hardware handshakes, but they are interrupt driven and if the lower priority console task is preempted by higher priority task, the interrupt driven hardware handshake won't work. Since I do have 256K of uncommitted memory, I'll pin my hope on massive size DMA buffers base on the argument that if 64K of DMA buffers are still not sufficient, perhaps the problem is too big for Z280RC to solve.
3. There is a chicken way out: Z280RC is RC2014 compatible, so if the problems can't be solved with the resources on-board, perhaps it is time to utilize the numerous RC2014 I/O modules.

In all cases, a lot of things for me to try...

Bill

PS, you guys may not know this, but September is wine-making time in New Mexico. I have about 70 gallons from my vineyard and need to bottle up 50 gallons of last years' wine to free up carboys. One can write seriously wicked codes with the help of 50 gallons of wine--or not. Laughing
Re: Interested in a Z280 SBC [message #5157 is a reply to message #5150] Sun, 09 September 2018 01:52 Go to previous messageGo to next message
hperaza is currently offline  hperaza
Messages: 68
Registered: March 2017
Member
wsm wrote on Sat, 08 September 2018 18:54
I don't use this code myself as the 33MHz Z8S180 is fine with extra overhead at 115,200 and has a four byte buffer. After the various comments this was just a quick-n-dirty curiosity wander to see what the maximum XMODEM baud rate on a 4 MHz Z80 MIGHT be and whether 115,200 could be supported.

You'll gain some additional speed if you leave out the test for error flags and rely on XMODEM's packet validation capabilities (CRC).

Quote:
Through the years I've seen a LOT of inefficient code and lots of bloat that lead people to believe there are hardware limitations when in fact it's software.

You can always achieve the best and most impressive performance if your program talks directly to the hardware while the CPU does nothing else (e.g. no interrupts, no DMA), but as Alan mentioned, your code will not be portable. If you are targeting your application for an existing OS, then you may have no other option than to use the OS services, and that means lots of overhead. And if the OS is a multi-tasking one (MP/M, UZI, etc.) then you have to take into account also additional factors like context switching, time-slices, preemption, concurrent interrupts, DMA, etc. Those are the factors that set in practice the upper limit of the character rate your application can handle. Note character rate and not baud rate; as nothing stops you from using e.g. a mega-bit baud rate (except, perhaps, the quality of the transmission line) if there is enough delay between characters or if you have a way to control the data flow, the last being the reason all this discussion started. You can use the baud rate as a way to control the character rate, but without flow control you can't guarantee that no characters will be lost.
Re: Interested in a Z280 SBC [message #5158 is a reply to message #5153] Sun, 09 September 2018 02:15 Go to previous messageGo to next message
hperaza is currently offline  hperaza
Messages: 68
Registered: March 2017
Member
lowen wrote on Sat, 08 September 2018 19:42
For the TRS-80 case specifically, the limits had as much to do with the IRQ setup in that hardware as anything else. That and floppy I/O, which was NMI driven programmed I/O. For direct text to the screen, the frame buffer was memory mapped and required software scrolling and remapping. Oh, and the software-scanned keyboard, with timer IRQ driven typeahead....

Those were the days! I loved those little systems where the CPU really did everything. Don't forget the cassette I/O: bit-banged, FM- or phase-modulated by the same CPU... I guess that's showing my age Smile

My first machine was a home-brewed 8080 system, also with software-scanned keyboard (via 8255 PPI) and memory-mapped video (8275 CRT + 8257 DMA), 8259 interrupt controller and 8253 timer for sound. The CPU was able to handle all that and in addition could run a simple multitasking OS with decent performance!
Re: Interested in a Z280 SBC [message #5159 is a reply to message #5152] Sun, 09 September 2018 03:01 Go to previous messageGo to next message
hperaza is currently offline  hperaza
Messages: 68
Registered: March 2017
Member
plasmo wrote on Sat, 08 September 2018 19:32
For next experiment, I kludged in a 1.84MHz clock to the UART so I can change the CPU clock without affecting the serial baud clock. I lower the CPU clock from 29.5MHz to 24MHz and I still can transfer data with XMODEM without any problem. So I don't think Z280RC is barely fast enough to run XMODEM at 29.5MHz.

There is something different about XMODEM on Linux but 2 stops may be an interim fix.

I haven't had the time to hookup a scope here to see what's happening, but I don't think is a XMODEM thing. In any case, there may be a difference between the way Windows and Linux talk to the USB dongle, or there may be timing differences from one dongle to another? After all, is the dongle the one that converts the USB packets into serial data.
Re: Interested in a Z280 SBC [message #5160 is a reply to message #5155] Sun, 09 September 2018 03:31 Go to previous messageGo to next message
hperaza is currently offline  hperaza
Messages: 68
Registered: March 2017
Member
plasmo wrote on Sat, 08 September 2018 20:58
1. CF byte-swap is still a problem although if XMODEM transfer at 115200 can be reliably achieved, the need of moving CF disk back and forth between PC & Z280RC may not be so pressing. In view of the number of existing Z280RC hardware out there, I want to find a software solution. I'm still thinking about byte swapping in Z280 software or use CF interface in 8-bit mode and enable DMA to make up for the lost performance.

How about the idea of the small PCB in-between? Existing Z280RCs could be upgraded that way.

As one of my P112s has a CF adapter and my CPU280 will have one too, it will be nice if I could move the CF card from one machine to another without having to byte-swap anything. Right now I'm working on modifying the CPU280 ROM code so it will recognize dynamically (and boot from) the different disk partitions like the P112 does.

Quote:
2. The discussion on UART hardware handshakes are instructive. Initially I thought about bring out two discrete I/O from CPLD as hardware handshakes, but they are interrupt driven and if the lower priority console task is preempted by higher priority task, the interrupt driven hardware handshake won't work. Since I do have 256K of uncommitted memory, I'll pin my hope on massive size DMA buffers base on the argument that if 64K of DMA buffers are still not sufficient, perhaps the problem is too big for Z280RC to solve.

Not sure I understand the above well. Two simple I/O lines should do the job, and they don't have to interrupt the CPU. The DMA solution still looks to me like shooting a fly with a cannon.

Quote:
3. There is a chicken way out: Z280RC is RC2014 compatible, so if the problems can't be solved with the resources on-board, perhaps it is time to utilize the numerous RC2014 I/O modules.

I've been considering that, specially since my main interest is multi-terminal multitasking, and for that the Z280RC will need more communication channels anyway.

Quote:
PS, you guys may not know this, but September is wine-making time in New Mexico. I have about 70 gallons from my vineyard and need to bottle up 50 gallons of last years' wine to free up carboys. One can write seriously wicked codes with the help of 50 gallons of wine--or not. Laughing

Second that! Laughing
Re: Interested in a Z280 SBC [message #5161 is a reply to message #5160] Sun, 09 September 2018 05:26 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 333
Registered: October 2015
Senior Member
You need the DMA because you don't have any FIFO. The DMA +RAM is the FIFO on the Z280 systems so avoids any overrun problems when the CPU is required to disable interrupts for something else like floppy disk I/O. On two howeveer GPIO lines are fine. You can control the CTS/RTS handshaking based upon how much DMA buffer space you have left and just check it on timers.

A lot of the old multiuser systems actually didn't have serial interrupts, but big FIFOs/DMA queues and each timer tick polled the queues. Some of the fancier ones offloaded the entire line editing so that in non character by character mode you got one interrupt and handed a line of data. All of this helped reduce the amount of time stolen by serial I/O.
Re: Interested in a Z280 SBC [message #5162 is a reply to message #5161] Sun, 09 September 2018 07:26 Go to previous messageGo to next message
hperaza is currently offline  hperaza
Messages: 68
Registered: March 2017
Member
etchedpixels wrote on Sun, 09 September 2018 05:26
You need the DMA because you don't have any FIFO. The DMA +RAM is the FIFO on the Z280 systems so avoids any overrun problems when the CPU is required to disable interrupts for something else like floppy disk I/O.

Other DMAs taking place (e.g. disk DMA) could preempt UART DMA as well. Likewise, if you disable interrupts for too long, or at a critical moment, then you'll not be able to flip the DMA buffers either, and you are back to square one. Unless you lower the CTS line before disabling interrupts, which brings us back to the original point: we need handshake lines.

At the end, we don't have to use 115200 baud if the system can't handle it, but handshake lines are always desirable, even at low speeds.

[Updated on: Sun, 09 September 2018 07:27]

Report message to a moderator

Re: Interested in a Z280 SBC [message #5163 is a reply to message #5141] Sun, 09 September 2018 10:25 Go to previous messageGo to next message
stefan_n is currently offline  stefan_n
Messages: 11
Registered: June 2018
Junior Member
hperaza wrote on Sat, 08 September 2018 05:05
Depends on what you are doing. A text editor, for example, is not the most demanding sort of application. But if you are using a RT OS (UZI280 is not), then you know that any task can be blocked by a higher priority one; and if the lower priority task was receiving data from the UART, then chances are that the input buffer will overflow if the task is blocked for too long, resulting in characters lost unless hardware handshake is used.

As for the terminal, my VT520 starts missing characters at 9600 baud when scrolling in 132x50 mode.


Just a note, the 38400 baud limit was under heavy system load running several processes like:
- cat dumping out characters at full speed to an ECB bus connected parallel terminal
- compiling the UZI kernel
- file copy from one HD partition to another partition
- and so on...
and receiving escape sequences send from a hardware terminal.

But you are right UZI280 is no RT OS so there is no guaranty this works under all circumstances, even it never failed for me. On a non RT OS handshake lines are the only way to warrant non character losses on serial IO.
Re: Interested in a Z280 SBC [message #5223 is a reply to message #1189] Wed, 26 September 2018 14:46 Go to previous messageGo to next message
fritzeflink is currently offline  fritzeflink
Messages: 80
Registered: January 2017
Location: germany
Member
UZI280

I got 2 floppy disks from Alexander who found the sources I asked for.
I don't know if the content of the disks is helpful but will collect all I get.

@stefan_n please take a look.

As I have a workaround for my website please cry if there are problems.

http://oldcomputers-ddns.org/public/pub/rechner/zilog/z280/u zi280/floppydisks_found_by_alex/readme.txt
http://oldcomputers-ddns.org/public/pub/rechner/zilog/z280/u zi280/floppydisks_found_by_alex/UZI280.ZIP
http://oldcomputers-ddns.org/public/pub/rechner/zilog/z280/u zi280/floppydisks_found_by_alex/UZI280_1.12.zip


/*-----
fritz
-----*/

[Updated on: Wed, 26 September 2018 15:19]

Report message to a moderator

Re: Interested in a Z280 SBC [message #5225 is a reply to message #5223] Thu, 27 September 2018 04:23 Go to previous messageGo to next message
hperaza is currently offline  hperaza
Messages: 68
Registered: March 2017
Member
I knew I had seen that somewhere. Just searched for 'stevie.taz' from UZI280.zip and found this on znode51. Is it the same thing?
Re: Interested in a Z280 SBC [message #5226 is a reply to message #5225] Thu, 27 September 2018 04:47 Go to previous messageGo to next message
fritzeflink is currently offline  fritzeflink
Messages: 80
Registered: January 2017
Location: germany
Member
hperaza wrote on Thu, 27 September 2018 13:23
I knew I had seen that somewhere. Just searched for 'stevie.taz' from UZI280.zip and found this on znode51. Is it the same thing?


Hi hperaza,

I don't know if it's identical as I'm not a programmer, stefan_N may take a look.
The znode51 is well known and there is a long friendship with the owner of the website.
znode51 is a part of www.gaby.de and the contact goes to back into the 90th.

As the owner of znode51 belongs to the CPU280 users it may be that he got a copy for preservation.

stefan_N told me that he send the source for UZI280 to Alex who even had a CPU280 at that time.
I even mailed the zip files to Stefan_N as I don't know if he got information about new posts.

Thanks for your hint. Smile



/*-----
fritz
-----*/

[Updated on: Thu, 27 September 2018 04:47]

Report message to a moderator

Re: Interested in a Z280 SBC [message #5227 is a reply to message #5226] Thu, 27 September 2018 05:21 Go to previous messageGo to next message
stefan_n is currently offline  stefan_n
Messages: 11
Registered: June 2018
Junior Member
Yes those are most likely the same files. I gave them to Alexander and Helmut who obviously uploaded them to Znode. BTW the sources for the HiTech C UZI280 c-library are still missing Sad
Re: Interested in a Z280 SBC [message #5274 is a reply to message #5094] Fri, 05 October 2018 11:17 Go to previous messageGo to next message
lowen is currently offline  lowen
Messages: 226
Registered: August 2016
Location: Western NC USA
Senior Member
etchedpixels wrote on Sun, 02 September 2018 16:32
...

I've tried the obvious things. I've rewritten the CF card, I've tried loadngo in serial mode. Any diagnostic recommendations to work out wtf happened ?

Alan

Alan, were you ever able to get your Z280RC working again?


--
Bughlt: Sckmud
Shut her down Scotty, she's sucking mud again!
Re: Interested in a Z280 SBC [message #5275 is a reply to message #5274] Fri, 05 October 2018 16:46 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 333
Registered: October 2015
Senior Member
Nope. Even tried changing the CPU. My existing one is somewhere between the UK and US and a replacement just arrived here. It will be interesting to learn what happened to the poor thing and get back to Fuzix and maybe MP/M and CP/M 3 hacking for it.

Bill btw has the most excellent customer service I've met Cool

Alan
Re: Interested in a Z280 SBC [message #5276 is a reply to message #5275] Fri, 05 October 2018 18:02 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 866
Registered: March 2017
Location: New Mexico, USA
Senior Member
It is the first failure of Z280RC in the field. I'm quite interested in finding out what has failed. I'll start with a careful visual inspection, observe activities of key signals, and hopefully CPLD is alive that I can reprogrammed it with diagnostic logic to help me locating the failure.

etchedpixels wrote on Fri, 05 October 2018 17:46
Nope. Even tried changing the CPU. My existing one is somewhere between the UK and US and a replacement just arrived here. It will be interesting to learn what happened to the poor thing and get back to Fuzix and maybe MP/M and CP/M 3 hacking for it.

Bill btw has the most excellent customer service I've met Cool

Alan

Thank you, that's quite a compliment, indeed. When legal liability and profit motive are removed, this is just one enthusiast talking to another enthusiast wanting to get the most out of this hobby.

Bill
Re: Interested in a Z280 SBC [message #5287 is a reply to message #5276] Sun, 07 October 2018 19:04 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 866
Registered: March 2017
Location: New Mexico, USA
Senior Member
Does anyone have a copy of Super Micro Magazine issue #2 that should have an article featuring detailed design of a Z280 on S100 card? George Warner is the designer.
Bill
Re: Interested in a Z280 SBC [message #5330 is a reply to message #5287] Mon, 15 October 2018 11:41 Go to previous messageGo to next message
zenxyzzy is currently offline  zenxyzzy
Messages: 14
Registered: September 2017
Location: san francisco
Junior Member
wow. where to begin. yes.

find attached the article from supermicro, which I got from the library of congress after a long search.
you'll find that he designed the board with the 8 bit bus, so it will be a bit slow compared to what the chip is capable of.

I've started on the board, but have so many irons in the fire that it never got beyond getting the reset right and redoing the bus
for 16 bits, which is very different, since the z80 bus and zbus have variant pin definitions.

good luck.

--curt
Re: Interested in a Z280 SBC [message #5331 is a reply to message #5330] Mon, 15 October 2018 11:57 Go to previous messageGo to next message
zenxyzzy is currently offline  zenxyzzy
Messages: 14
Registered: September 2017
Location: san francisco
Junior Member
so, my first and second prototypes of the s100-z280 board. strange build method, I know...

build notes, as far as it goes:


the buffered proto board has drivers that make pretty strong assumptions that you are building a bus slave, with the address lines using
244's in the wrong direction, so I can't use them.

the switching reg is pretty good, but has a highish cutoff. I have to run switchers in my power supply at 7.5 volts, and when I was using 2940's,
I could get away with 6.8V.

the z280 clock is a mess, with a bare rock I couldn't get it stable, so I used a socketed oscillator.

all these pins on the front mean I don't get confused about pin numbers when I wire wrap; i used to do it on the back and kept getting bit by
mixing up the pin numbers.

also, makes plugging in the logicport much nicer. I wish intronix would finally release a linux version or some way of plugging in protocol analyzers.
the sigrok stuff isn't quite ripe enough with respect to triggering.

The power on clear is still broken; that's the cap on the top right. gotta break out the scope on that one. probably I'll just lift the circuit from John M's many cpu's.

and a few questions that might be germane to getting a high quality mod:
1) none of the 16 bit recent boards do the serial byte transfer if sxtn isn't answered from xtrq. is that because of the tight timing or just the circuit complexity?

2) how is the clock (phi) switching supposed to work? this is not in the S100 spec, but there's been a few different implementations. do we have a spec for this?
I'm happy just grabbing the circuit from known good designs, but which is the best, as in robust?

3) does anybody know how the later compupro 80286 cpu did their 2-cycle memory access? this is definitely outside the spec.

4) cromemco supposedly did some bizarre double speed stuff with the XXU to move 32bits over the s100. anybody have details on this?

my deadend first prototype:

index.php?t=getfile&id=1085&private=0

my second prototype, much better

yellow is address bus, blue is data, green is wait, orange is clock and strobes, red is reset.
white is ground and black is +5, except on the cpu, where it is breakout on the back. If I add it, purple will be dma/master/slave logic.
almost everything is wire wrap on short headers. i can get 2 wraps per post, but this almost never a problem.

index.php?t=getfile&id=1087&private=0

and the back:
index.php?t=getfile&id=1086&private=0

maybe I'll finish it this weekend. we'll see. then I need to transcribe it to kicad. ugh.

--curt
Re: Interested in a Z280 SBC [message #5346 is a reply to message #5331] Wed, 17 October 2018 10:49 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 866
Registered: March 2017
Location: New Mexico, USA
Senior Member
Thank you very much for the article. The author, George Warner, has purchased a Z280RC board and mentioned the SuperMicro article but was not able to find it. He still has the S100 Z280 hardware but is reluctant to power up the S100 chassis due to the aging power supply. I'm sure he appreciates having a copy of the article. I hope he'll join the retrobrew forum and shares his knowledge of Z280.

I'm unfamiliar with S100 bus so can't answer your questions, but I'm very interested in your progress. Please keep us updated.
Bill
Re: Interested in a Z280 SBC [message #5394 is a reply to message #5346] Sat, 27 October 2018 09:21 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
MOOF!
Just read thru all 12 pages... lots of good stuff here...

I've very much been enjoying plasma's z280rc board... trying to get banked CP/M plus running on it... so close... everything boots, cpmldr runs, on cold BOOT ccp.com loads then WBOOT's...
... and then hangs somewhere... I put trace statements on all my BIOS entry points... boot non-banked (on bank zero) works; try booting non-banked on bank one and... hangs after it jumps to ccp.

I've pored over the code multiple times and I'm just not seeing the problem... Probably something really stupid... ;-)

Anyway, I've got a quick question: Did the zsm sources ever get uploaded anywhere (GitHub?Wink? For some reason it doesn't support the "SET" directive. It's like EQU but allows the value to change; it's useful in REPT, IRPC & IRP groups to count iterations, etc. (See the MAC documentation at www.cpm.z80.de/manuals/mac.pdf section 4.4 (IIRC)Wink.

zenxyzzy: Looking at your "first prototype"... 1st thing I noticed was the LM7805 (linear) voltage regulator... and thought "Why didn't he use a switcher?"... then saw prototype #2... Yep, smart guy! ;-) Loved the color coded wire-wrap wires. Back when I did the Z280 S-100 board they sold IC labels called BugBacksâ„¢. Little plastic tabs that fit over the wire-wrap pins to label (number) them. Help'd a lot with mis-counting. IIRC they were from "down under". Can't find them now... Sad
Re: Interested in a Z280 SBC [message #5396 is a reply to message #5394] Sat, 27 October 2018 13:47 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 333
Registered: October 2015
Senior Member
Did you remember to write the jump vectors etc into bank 1 so that when CCP loads and runs it actually calls back into CP/M rather than oblivion ?
Re: Interested in a Z280 SBC [message #5398 is a reply to message #5396] Sat, 27 October 2018 17:04 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
Yep... (I assume you mean the BIOS WBOOT at zero and the BIOS entry at 5?Wink
Re: Interested in a Z280 SBC [message #5399 is a reply to message #5398] Sat, 27 October 2018 17:07 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
Looks like somethings is wack with the DMA code... it works fine three times and then doesn't; call it again and it's good... Yet everything looks golden... I'm tempted to post it to plasmo's GitHub suppository and let someone else stare at it...
Re: Interested in a Z280 SBC [message #5400 is a reply to message #5399] Sat, 27 October 2018 17:26 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 866
Registered: March 2017
Location: New Mexico, USA
Senior Member
geowar1,
Welcome, good to see you here.

Please do post your code on my GitHub (https://github.com/Plasmode/Z280RCWink. I can take a look as well, but I ran into difficulties porting CP/M 3 to Z280 4-5 months ago and never completed the job. I just started using GitHub so I'm not exactly sure how to review/add your change to my master branch. Do save a copy just in case I screwed it up!
Bill
Re: Interested in a Z280 SBC [message #5401 is a reply to message #1189] Sat, 27 October 2018 18:27 Go to previous messageGo to next message
b1ackmai1er is currently offline  b1ackmai1er
Messages: 396
Registered: November 2017
Senior Member
"plasmo's GitHub suppository"

Oooh that sounds like a good resource for some back end coding.

Re: Interested in a Z280 SBC [message #5402 is a reply to message #5394] Sat, 27 October 2018 18:35 Go to previous messageGo to next message
b1ackmai1er is currently offline  b1ackmai1er
Messages: 396
Registered: November 2017
Senior Member
geowar1 wrote on Sat, 27 October 2018 09:21
MOOF!

I've pored over the code multiple times and I'm just not seeing the problem... Probably something really stupid... ;-) Sad


I'm playing with some SBCV2 banking stuff at the moment.

The two things that caught me out ...
Overwriting running code when moving between banks.
Overwriting the stack when moving between banks.
What helped me ...
Some debug code that output verification that the first couple of bytes of transferred code were the same as the source.

Regards Phil.

[Updated on: Sat, 27 October 2018 18:36]

Report message to a moderator

Re: Interested in a Z280 SBC [message #5403 is a reply to message #5402] Sat, 27 October 2018 20:20 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
CP/M Plus tends to assume that XMOVE isn't implemented... It BIOS:MOVE's FCB's and any write data from banked memory to non-banked; switches banks; does it BIOS stuff; switches back to original bank and then BIOS:MOVE's the FCB and any read data back to the banked memory area. All that work to get XMOVE & Z280 DMA working and it never does an interbank BIOS:XMOVE, BIOS:MOVE. I'm tracing all stacks and memory areas and there doesn't seem to be any overlap... I know what the CCP.com starts with... If I do the BIOS:XMOVE, BIOS:MOVE to copy it to the TPA and it's wrong I immediately try again... and it works. WTF?
Re: Interested in a Z280 SBC [message #5404 is a reply to message #5401] Sat, 27 October 2018 22:34 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
My bad for writing C-R-A-P-P-Y code... ;-)
Re: Interested in a Z280 SBC [message #5405 is a reply to message #5394] Sun, 28 October 2018 02:06 Go to previous messageGo to next message
hperaza is currently offline  hperaza
Messages: 68
Registered: March 2017
Member
geowar1 wrote on Sat, 27 October 2018 09:21
Anyway, I've got a quick question: Did the zsm sources ever get uploaded anywhere (GitHub?)? For some reason it doesn't support the "SET" directive. It's like EQU but allows the value to change; it's useful in REPT, IRPC & IRP groups to count iterations, etc. (See the MAC documentation at www.cpm.z80.de/manuals/mac.pdf section 4.4 (IIRC)).

SET is a Z80 instruction (set bit, like in "set 7,a") and therefore cannot be used as a pseudo-op. What you want is DEFL and is supported by ZSM4. For compatibility with M80, ASET is also implemented, which does the same thing.

Remember that MAC is an 8080 assembler, while ZSM4 is a Z80 relocatable assembler, and thus there are subtle differences between the two (I would suggest using the M80 documentation instead as a guide). When I get some free time I'll prepare some docs, perhaps using the M80 manual as starting point.

[Updated on: Sun, 28 October 2018 02:07]

Report message to a moderator

Re: Interested in a Z280 SBC [message #5407 is a reply to message #5405] Sun, 28 October 2018 10:49 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
hperaza wrote on Sun, 28 October 2018 02:06
geowar1 wrote on Sat, 27 October 2018 09:21
Anyway, I've got a quick question: Did the zsm sources ever get uploaded anywhere (GitHub?Wink? For some reason it doesn't support the "SET" directive. It's like EQU but allows the value to change; it's useful in REPT, IRPC & IRP groups to count iterations, etc. (See the MAC documentation at www.cpm.z80.de/manuals/mac.pdf section 4.4 (IIRC)Wink.

SET is a Z80 instruction (set bit, like in "set 7,a") and therefore cannot be used as a pseudo-op. What you want is DEFL and is supported by ZSM4. For compatibility with M80, ASET is also implemented, which does the same thing.

Remember that MAC is an 8080 assembler, while ZSM4 is a Z80 relocatable assembler, and thus there are subtle differences between the two (I would suggest using the M80 documentation instead as a guide). When I get some free time I'll prepare some docs, perhaps using the M80 manual as starting point.


Excellent! Just what I needed to know. ;-)
(Thou I'm trying to keep my machines Micro$oft clean... ;-)
Re: Interested in a Z280 SBC [message #5417 is a reply to message #5407] Tue, 30 October 2018 03:40 Go to previous messageGo to next message
hperaza is currently offline  hperaza
Messages: 68
Registered: March 2017
Member
geowar1 wrote on Sun, 28 October 2018 10:49
Excellent! Just what I needed to know. ;-)
(Thou I'm trying to keep my machines Micro$oft clean... ;-)

Same reason why I tend to stay away from GitHub these days.
Re: Interested in a Z280 SBC [message #5430 is a reply to message #1189] Mon, 05 November 2018 15:53 Go to previous messageGo to next message
agn453 is currently offline  agn453
Messages: 68
Registered: June 2018
Location: Newcastle, NSW, Australia
Member
Greetings fellow Z280 tinkerers.

Having put aside my Z280RC for a few months, it resurfaced last week and I thought I'd try to iron out the remaining bugs in my CP/M-Plus BIOS routines.

I'm still having problems with the Banked version - which loads and lets me run programs, but blows up (technical term for "hangs" or exhibits "memory corruption") when I (for example) try to copy large files with CP/M 3 PIP - but it works fine if I use SWEEP (NSWEEP 2.07 from the public domain archives).

I suspect either a typo somewhere in my source-code, a stack overflow, or an issue with the way CP/M is handling data buffers (old GENCPM bug perhaps?Wink.

Anyhow, I've uploaded my BIOS280 source files to my GitHub repositry for your perusal.

You'll find them at

https://github.com/agn453/Z280RC

in the system/bios280 subdirectory.

If you've got time to look at them and see something wrong - let me know.

In the mean-time - I'm about to try hard-coding the disk parameter blocks / allocation headers / buffer control blocks (away from using the macros in my CPM3M80.LIB)...

Tony


--
Tony Nicholson

[Updated on: Mon, 05 November 2018 19:52]

Report message to a moderator

Re: Interested in a Z280 SBC [message #5431 is a reply to message #5430] Mon, 05 November 2018 16:13 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
I've been working on the same project off and on for about six weeks...
I've gone over every line of code multiple times and added tons of logging (set "TRACE EQU 2").
I was hanging on boot somewhere in DOS...
Until I realized that the cpmldr in the system tracks wouldn't load the CPM3.SYS built with banked BIOS.
But I could boot into CP/M 2.2 and then run the CPMLDR built with the banked BIOS.
It doesn't appear to have any problems with large files but...
I sent my sources (attached) to BillS to try on his hardware he noticed issues with uninitialized memory.
When I get a chance I'll take a look at your sources and see if I notice anything amiss. ;-)
  • Attachment: Archive.zip
    (Size: 22.44KB, Downloaded 242 times)
Re: Interested in a Z280 SBC [message #5432 is a reply to message #5430] Mon, 05 November 2018 19:02 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 866
Registered: March 2017
Location: New Mexico, USA
Senior Member
Tony,
I downloaded your files and assembled them on my Z280RC without errors. When I run the banked software using the test.sys/test.com method or cpm3.sys/cpmldr3.com method, I got lots of diagnostic messages (a sampe of the message below), but I am not able to issue CP/M commands. How can I work around these diagnostic messages?
Bill

?BNKSL Select Bank 01
?BNKSL Select Bank 01
DMAXFR using DMA2 from P000100 to P010100 count 3200
MOVE from 010D6A to 01F12A 36
DMAXFR using DMA3 from P010D6A to P00F12A count 36
?BNKSL Select Bank 00
?BNKSL Select Bank 01
MOVE from 010392 to 01F12A 36
DMAXFR using DMA3 from P010392 to P00F12A count 36
?BNKSL Select Bank 00
?BNKSL Select Bank 01
?BNKSL Select Bank 00
MOVE from 00DCA1 to 00DBA5 252
DMAXFR using DMA3 from P00DCA1 to P00DBA5 count 252
MOVE from 00D8B5 to 00D7BD 248
DMAXFR using DMA3 from P00D8B5 to P00D7BD count 248
?BNKSL Select Bank 01
?BNKSL Select Bank 00
?BNKSL Select Bank 01
?BNKSL Select Bank 00

?BNKSL Select Bank 01
?BNKSL Select Bank 00A
?BNKSL Select Bank 01
?BNKSL Select Bank 00>
?BNKSL Select Bank 01
MOVE from 010DF4 to 01F12A 234
DMAXFR using DMA3 from P010DF4 to P00F12A count 234
?BNKSL Select Bank 00
Re: Interested in a Z280 SBC [message #5433 is a reply to message #5432] Mon, 05 November 2018 19:49 Go to previous messageGo to next message
agn453 is currently offline  agn453
Messages: 68
Registered: June 2018
Location: Newcastle, NSW, Australia
Member
plasmo wrote on Tue, 06 November 2018 14:02
Tony,
I downloaded your files and assembled them on my Z280RC without errors. When I run the banked software using the test.sys/test.com method or cpm3.sys/cpmldr3.com method, I got lots of diagnostic messages (a sampe of the message below), but I am not able to issue CP/M commands. How can I work around these diagnostic messages?
Bill

[snip]

?BNKSL Select Bank 01
?BNKSL Select Bank 00A
?BNKSL Select Bank 01
?BNKSL Select Bank 00>
?BNKSL Select Bank 01
MOVE from 010DF4 to 01F12A 234
DMAXFR using DMA3 from P010DF4 to P00F12A count 234
?BNKSL Select Bank 00[/code]


I can see the A> prompt Smile

As I said, I left full debug messages on - and they come out interspersed with console output. To disable the Kernel debug messages, edit the CONFBANK.LIB file and set KRNL$DEBUG to FALSE, then rebuild with BANKBIOS.SUB

With debugging on - you can type commands and they should echo (maybe with more debugging mixed in). I find that using Simeon Cran's ZCPM3 replacement BDOS works better (and does far less bank selection). To use this, do a USE-ZPM3.SUB to load this instead of the standard CP/M 3 BDOS.

Tony


--
Tony Nicholson
Re: Interested in a Z280 SBC [message #5434 is a reply to message #5431] Mon, 05 November 2018 20:01 Go to previous messageGo to next message
agn453 is currently offline  agn453
Messages: 68
Registered: June 2018
Location: Newcastle, NSW, Australia
Member
geowar1 wrote on Tue, 06 November 2018 11:13
I've been working on the same project off and on for about six weeks...
I've gone over every line of code multiple times and added tons of logging (set "TRACE EQU 2").
I was hanging on boot somewhere in DOS...
Until I realized that the cpmldr in the system tracks wouldn't load the CPM3.SYS built with banked BIOS.
But I could boot into CP/M 2.2 and then run the CPMLDR built with the banked BIOS.
It doesn't appear to have any problems with large files but...
I sent my sources (attached) to BillS to try on his hardware he noticed issues with uninitialized memory.
When I get a chance I'll take a look at your sources and see if I notice anything amiss. ;-)


Thanks for this. I'm seeing double right now - having gone through and checked the assembled output for possible errors in the machine-code. I can almost execute Z280 binary code in my head now by looking at hexadecimal op-codes! Very Happy I'm pretty sure ZSM4 is doing the right things now!

That CPMLDR issue of not loading images that were larger than the first extent was a well known problem way back when! There are numerous fixes around - including the CPMLDR3.MAC source I put on my GitHub.

Tony

Tony


--
Tony Nicholson
Re: Interested in a Z280 SBC [message #5435 is a reply to message #5434] Tue, 06 November 2018 11:52 Go to previous messageGo to previous message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
Ok, I've had a chance to review your BIOS sources... and I don't see any issues that would prevent banked CP/M Plus from working.
And I tried my (version of BillS's) z280rc BIOS with CPMLDR3.MAC... same results. Sad
I also tried my (version of BillS's) z280rc BIOS with the BNKBDOS3.SPZ & RESBDOS3.SPZ files... and got the same result. Sad
--
Gerrrrr...
--
I've also crawled thru the CPU280 BIOS that Tony Nicholson translated from German to English...
And other than doing some things via system traps... everything looks kosher.
--
Gerrrr...

Previous Topic: New TI Project
Next Topic: Z180 upd7220 GDC SBC


Current Time: Fri Mar 29 04:45:23 PDT 2024

Total time taken to generate the page: 0.01661 seconds