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 #5436 is a reply to message #5435] Tue, 06 November 2018 17:31 Go to previous messageGo to next message
plasmo is currently online  plasmo
Messages: 876
Registered: March 2017
Location: New Mexico, USA
Senior Member
Tony,
I set KRNL$DEBUG to false and rebuild. I can verify that cpm3 will boot up but pip with verify won't work for file size of 24K or greater. Even if files are smaller than 24K, and while pip can successfully copy & verify individual files, pip a collection of such files are not successful. e.g., pip c:=a:*.com[v] will not run to completion.

George,
I also tried your CPM Plus again. I've mentioned that memory contents need to be initialized with memory test patterns for your cpmldr to successfully boot CPM Plus. It turns out the magical locations are from 0x8-0xA (RST 08). They need to have the values 0x8F, 0x82, 0x06. These are pseudo random test patterns of my memory test, other values may also work. Once your CPM Plus is successfully booted, pip works just fine with any size files.

If we can just combine George & Tony's software...
Re: Interested in a Z280 SBC [message #5437 is a reply to message #5436] Tue, 06 November 2018 17:47 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
>>magical locations are from 0x8-0xA (RST 08). They need to have the values 0x8F, 0x82, 0x06.

Weird, AFAIK those locations aren't used for anything in CP/M Plus... (It is a Z80 Restart vector... but not used by (AFAIK) any CP/M).

Drat... poking those didn't change anything for me... still hangs after jumping to CCP.

008 08F ADC A,A
009 082 ADD A,D
00A 006 LD B,nn

Re: Interested in a Z280 SBC [message #5438 is a reply to message #5437] Tue, 06 November 2018 18:16 Go to previous messageGo to next message
plasmo is currently online  plasmo
Messages: 876
Registered: March 2017
Location: New Mexico, USA
Senior Member
George,
I'm surprised that changing location 0x8-0xA to 8F 82 06 did not work for you. What I did was changing to memory locations with ZZMon before issuing 'b2' command to boot up CP/M2.2 and then type 'cpmldr' to boot up CP/M Plus:

TinyZZ Monitor v0.99 6/9/18

>e 0008
0008 : 00 8f 8F
0009 : 00 82 82
000A : 00 06 06
000B : 00 x

>boot CP/M
1--User Apps,
2--CP/M2.2,
3--CP/M3: 2 press Return to execute command
Copyright 1979 (c) by Digital Research
CP/M 2.2 for TinyZ280
3/25/18 3.5 meg RAMDisk

a>cpmldr






CP/M V3.0 Loader
Copyright (C) 1998, Caldera Inc.

 BNKBIOS3 SPR  E400  0A00
 BNKBIOS3 SPR  BE00  1200
 RESBDOS3 SPR  DE00  0600
 BNKBDOS3 SPR  9000  2E00

 55K TPA
Copyright 1979 (c) by Digital Research
CP/M Plus for z280rc 11/02/2018
8x 8 MByte CF disks and 1x 1.5 MByte RAM disk
A>dir
A: XMODEM   COM : ED       COM : ERASE    COM : GENCOM   COM : GENCPM   COM : GET      COM : HELP     COM : HELP     HLP
A: HEXCOM   CPM : PATCH    COM : PIP      COM : PUT      COM : README   1ST : RENAME   COM : RESBDOS3 SPR : SAVE     COM
A: SET      COM : SETDEF   COM : SHOW     COM : SUBMIT   COM : TYPE     COM : BDOS3    SPR : BNKBDOS3 SPR : CCP      COM
A: COPYSYS  COM : CPMLDR   REL : DATE     COM : DEVICE   COM : DIR      COM : DUMP     COM : LINK     COM : CPM3     SYS
A: CPMLDR   COM
A>
Re: Interested in a Z280 SBC [message #5439 is a reply to message #5435] Tue, 06 November 2018 18:47 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 Wed, 07 November 2018 06:52
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...



Thanks George ?? (Sorry if I guessed your name incorrectly).

I did find a missing save of AF in the bank selection routine (SELMEM aka ?BNKSL) only when I tried to clear the RAMDISK using my BIOS debugger's Z9 command (which writes E5's over the first 56KB of physical address 080000h - the directory groups of drive M:).

I'm beginning to suspect a problem with the way CP/M 3 PIP copies files (perhaps it uses Multi-sector I/O?Wink. I can do a B:PIP M:=C:*.*[G1V] to copy all my BIOS working files from C1: without errors (using CP/M 2.2 PIP).

I've also noticed that on the Z280RC using any version of CP/M 3 (Non-banked or Banked - including Bill's original supplied CPM3.SYS) that I cannot initialise a disk with time-stamping enabled using

A>initdir m: ! set m: [name=ramdisk,create=on,update=on] ! show m:[label]


(My S100 system and the SIMH AltairZ80 simulator have no problem doing this exact command). Now this is weird!

Tony


--
Tony Nicholson

[Updated on: Tue, 06 November 2018 18:49]

Report message to a moderator

Re: Interested in a Z280 SBC [message #5441 is a reply to message #5439] Wed, 07 November 2018 16:51 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
>> Thanks George ?? (Sorry if I guessed your name incorrectly).

It is George... but you may call me anything but late to dinner... ;-)

>> I did find a missing save of AF in the bank selection routine (SELMEM aka ?BNKSL) only when I tried to clear the RAMDISK using my BIOS debugger's Z9 command (which writes E5's over the first 56KB of physical address 080000h - the directory groups of drive M:).

I didn't see AF saved in any of the other CP/M Plus BIOS's I have (CPU280 probably being the best one). BC/DE/HL yes... but not AF.

>> I'm beginning to suspect a problem with the way CP/M 3 PIP copies files (perhaps it uses Multi-sector I/O?Wink. I can do a B:PIP M:=C:*.*[G1V] to copy all my BIOS working files from C1: without errors (using CP/M 2.2 PIP).

I'm skeptical that a BIOS mistake would mess up pip's greater than any specific size... BIOS really doesn't know about anything at the file system level... only drives, tracks and sectors.

>> I've also noticed that on the Z280RC using any version of CP/M 3 (Non-banked or Banked - including Bill's original supplied CPM3.SYS) that I cannot initialise a disk with time-stamping enabled using

I didn't have any problem with BillS's original BIOS or my version with...

A>initdir m: ! set m: [name=ramdisk,create=on,update=on] ! show m:[label]


BTW: I did notice that some of BillS's files may be corrupted... I had an error with GENSYS that I fixed by downloading a copy from the web. You might try pulling down a different PIP.
Re: Interested in a Z280 SBC [message #5442 is a reply to message #5441] Wed, 07 November 2018 17:33 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
Quick note: I very well may have corrupted the GENSYS.COM file on my system... and I could have re-installed BillS's CPM3DSTR.HEX and that may have fixed the issue... so...
(no slight meant toward BillS! ;-)
Re: Interested in a Z280 SBC [message #5443 is a reply to message #5441] Wed, 07 November 2018 18:40 Go to previous messageGo to next message
agn453 is currently offline  agn453
Messages: 68
Registered: June 2018
Location: Newcastle, NSW, Australia
Member
George,

geowar1 wrote on Thu, 08 November 2018 11:51

>> Thanks George ?? (Sorry if I guessed your name incorrectly).

>> I did find a missing save of AF in the bank selection routine (SELMEM aka ?BNKSL) only when I tried to clear the RAMDISK using my BIOS debugger's Z9 command (which writes E5's over the first 56KB of physical address 080000h - the directory groups of drive M:).

I didn't see AF saved in any of the other CP/M Plus BIOS's I have (CPU280 probably being the best one). BC/DE/HL yes... but not AF.


I had removed the "push af/pop af" when I was reviewing the register usage of each routine (grasping at straws). My BIOSDBG module, however, relied on no registers being changed when a different user-mode bank was selected. It was either re-instate it in the BIOS - or add the push/pop in BIOSDBG.

In any event, the effect on the file verification error didn't change.

Quote:


[snip]
>> I've also noticed that on the Z280RC using any version of CP/M 3 (Non-banked or Banked - including Bill's original supplied CPM3.SYS) that I cannot initialise a disk with time-stamping enabled using

I didn't have any problem with BillS's original BIOS or my version with...

A>initdir m: ! set m: [name=ramdisk,create=on,update=on] ! show m:[label]


BTW: I did notice that some of BillS's files may be corrupted... I had an error with GENSYS that I fixed by downloading a copy from the web. You might try pulling down a different PIP.


I think I replaced all of Bill's supplied CP/M Plus files with the Y2K fixed ones. I have a build environment and the CP/M 3 sources on my Mac Mini that allows me to recompile them (cpm3src_unix.zip from http://cpm.z80.de/source.html + zxcc-0.5.7 + thames-0.1.1). I've rebuilt PIP.COM with a larger stack (it was 100 bytes and I increased it to 150) - but this had no effect!

I have even tried the files from my Digital Research original 8-inch CP/M-Plus floppy distribution disks!

Tony


--
Tony Nicholson
Re: Interested in a Z280 SBC [message #5444 is a reply to message #5443] Wed, 07 November 2018 20:38 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
From the CP/M PlusTM (CP/M Version 3.0) Operating System System Guide, page 66:
Quote:

BIOS Function 27: SELMEM
Select Memory Bank
Entry Parameters: A=Memory Bank Returned Values; None
The SELMEM entry point is only present in banked systems. The banked version of the CP/M 3 BDOS calls SELMEM to select the current memory bank for further instruction execution or buffer references. You must preserve or restore all registers other than the accumulator, A, upon exit.


I'm developing on a MacMini also... (I retired from  two 1/2 years ago. ;-) Just upgraded to the new Mac mini (2018); six-core 3 GHz Intel Core i5... it's a screamer; Now if only they'd update my MacPro (2013).
Re: Interested in a Z280 SBC [message #5445 is a reply to message #5444] Wed, 07 November 2018 21:59 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 Thu, 08 November 2018 15:38
From the CP/M PlusTM (CP/M Version 3.0) Operating System System Guide, page 66:
Quote:

BIOS Function 27: SELMEM
Select Memory Bank
Entry Parameters: A=Memory Bank Returned Values; None
The SELMEM entry point is only present in banked systems. The banked version of the CP/M 3 BDOS calls SELMEM to select the current memory bank for further instruction execution or buffer references. You must preserve or restore all registers other than the accumulator, A, upon exit.


I'm developing on a MacMini also... (I retired from  two 1/2 years ago. ;-) Just upgraded to the new Mac mini (2018); six-core 3 GHz Intel Core i5... it's a screamer; Now if only they'd update my MacPro (2013).


George

I saw that in my fine set of paper original second edition CP/M-Plus manuals dated July 1983 - so I might just change it back again!

Lucky you with the new MacMini!

I'll be keeping my MacMini6.2 (Late 2012) with 2.6 GHz 16MB quad-core i7 going for a few more years yet! I looked at the new one and was stunned at the price in Australian Dollars (the 16GB i5 six-core with 1TB SSD is almost AU$3000). My current similarly configured one was about half that price over 5 years ago!

What I really need is a really good development toolset/debugger for the Z280! I'm at the stage where I might "blame the hardware" and put this aside again! I started reading the CP/M source code today to get to grips with what should be happening under the covers!

Tony


--
Tony Nicholson
Re: Interested in a Z280 SBC [message #5446 is a reply to message #5445] Wed, 07 November 2018 22:10 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
>>Lucky you with the new MacMini!

Yeah, it wasn't cheap... but if history is any indication there won't be a new one for another 5 years...
I cringe to think what the new MacPro will cost... (if it ever ships).
All I can say is that I really miss my employee discount. ;-)
--
Back on topic... I'm currently plagiarizing the CPU280 sources... Moving stuff behind system calls. Gonna see if I can get the non-banked (shared) area down to the last 4K page... ;-)
Re: Interested in a Z280 SBC [message #5449 is a reply to message #5446] Thu, 08 November 2018 17:29 Go to previous messageGo to next message
agn453 is currently offline  agn453
Messages: 68
Registered: June 2018
Location: Newcastle, NSW, Australia
Member
Just an update regarding the BIOS source files for Bill Shen's Z280RC on my GitHub at https:/github.com/agn453/Z280RC ...

I changed the disk I/O modules to manually define the disk parameter headers, disk parameter blocks and define Allocation Vector storage (rather than use the CPM3M80.LIB macros and rely on GENCPM to set up the double-bit allocation vectors correctly). This hasn't fixed the Banked version's CP/M 3 PIP file verification errors though. Sad

Tony


--
Tony Nicholson
Re: Interested in a Z280 SBC [message #5452 is a reply to message #5449] Fri, 09 November 2018 20:05 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
Ok, I found one issue: I was setting the MMU MCR without the I/O page set correctly... (I restored the previous I/O page before setting the MCR)...
So that's getting me further now...
Re: Interested in a Z280 SBC [message #5453 is a reply to message #5452] Fri, 09 November 2018 22:48 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
Ok... some success... I _FINIALLY_ got it to book banked... but... pip fails verify after ≈48K... I tried using the banked ZP/M (BNKBDOS3.SPZ & RESBDOS3.SPZ) files... but they hung at WBOOT... so I switched back to the DRI .spr files and... they're hanging at WBOOT also now... Gerrrrrrr...

Bedtime... I'll play more tomorrow...

Re: Interested in a Z280 SBC [message #5454 is a reply to message #5453] Sat, 10 November 2018 00:48 Go to previous messageGo to next message
rhkoolstar is currently offline  rhkoolstar
Messages: 276
Registered: October 2015
Senior Member
I've had similar issues with pip.com in a Z80 CP/M system. I am using PPIP.com now and never had any troubles anymore.

There seem to have been vague problems with PIP.COM, mainly with large or multiple files, to others too.
Maybe PIUP.COM is at fault and PPIP.COM is something to try?

Rienk
  • Attachment: ppip18.lbr
    (Size: 72.38KB, Downloaded 244 times)
Re: Interested in a Z280 SBC [message #5456 is a reply to message #5454] Sat, 10 November 2018 08:41 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
Is that for CP/M 2.2 or 3.x? We're trying to bring up CP/M Plus on a Z280 board.
Re: Interested in a Z280 SBC [message #5457 is a reply to message #5456] Sat, 10 November 2018 12:18 Go to previous messageGo to next message
rhkoolstar is currently offline  rhkoolstar
Messages: 276
Registered: October 2015
Senior Member
Both.

I am using PPIP for all my CP/M versions

Do Z80 binaries run on the Z280 implementation?

Rienk
Re: Interested in a Z280 SBC [message #5459 is a reply to message #5457] Sat, 10 November 2018 16:54 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
> I am using PPIP for all my CP/M versions
Does it support all the CP/M Plus features? (archive, date & time, etc.Wink

> Do Z80 binaries run on the Z280 implementation?
Yes. It's Z80 backwards compatible. ;-)
Re: Interested in a Z280 SBC [message #5460 is a reply to message #5457] Sat, 10 November 2018 16:57 Go to previous messageGo to next message
agn453 is currently offline  agn453
Messages: 68
Registered: June 2018
Location: Newcastle, NSW, Australia
Member
Another update for my BIOS for the Z280RC at https://github.com/agn453/Z280RC ...

I've added DEBUG capability to enter the debugger upon CTRL-P being typed at the console. Providing that the system is waiting for input, this allows me to get in to display the contents of memory.

Also I made a special banked configuration (BANKED1.DAT input to GENCPM) that supports only two banks (bank 0 and 1) with directory hashing disabled and only a single directory and data buffer for each drive in bank 0. The resulting CPM3BNK1.SYS appears to be NOT WORKING (and I'm now NOT convinced there's a problem with CP/M 3 PIP corrupting buffers).

Now on a mission to further debug the buffer corruptions when they are in banks 2 and 3...

Tony

Edit: There's still file corruptions (I tried to extract the PPIP18.LBR file and UNCR created garbage on the banked version, but correctly expanded the compressed files under the Nonbanked system).


--
Tony Nicholson

[Updated on: Sat, 10 November 2018 23:41]

Report message to a moderator

Re: Interested in a Z280 SBC [message #5461 is a reply to message #5460] Sat, 10 November 2018 17:18 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
>> Also I made a special banked configuration (BANKED1.DAT input to GENCPM)
Would you email me that? (or attach to reply?Wink I'm < geowar 1 @ mac dot com > (without spaces).

I've been playing with different gencpm.dat's because some seem more stable than others.

On my current build if I zero memory then it runs until it tries to copy something to 00:0000h... if I fill (with 0FFh) memory instead it runs until it tries to copy something to 00:FFFF...

Based on that (and BillS's earlier input) it really looks like uninitialized memory is causing my issue... but it's not in the BIOS (I've tried using defb & defw instead of defs with no change in behavior... it really looks like a BDOS issue...Wink

Then again it could be the SCB not being initialized properly?

Probably just a short between my headsets... ;-)
Re: Interested in a Z280 SBC [message #5462 is a reply to message #5461] Sat, 10 November 2018 17:28 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 Sun, 11 November 2018 12:18
>> Also I made a special banked configuration (BANKED1.DAT input to GENCPM)
Would you email me that? (or attach to reply?Wink I'm < geowar 1 @ mac dot com > (without spaces).

I've been playing with different gencpm.dat's because some seem more stable than others.

On my current build if I zero memory then it runs until it tries to copy something to 00:0000h... if I fill (with 0FFh) memory instead it runs until it tries to copy something to 00:FFFF...

Based on that (and BillS's earlier input) it really looks like uninitialized memory is causing my issue... but it's not in the BIOS (I've tried using defb & defw instead of defs with no change in behavior... it really looks like a BDOS issue...Wink

Then again it could be the SCB not being initialized properly?

Probably just a short between my headsets... ;-)


Attached is BANKED1.DAT (copy it to GENCPM.DAT before running GENCPM.COM). I've set bank 0 to start at 1400h (reserving the first 5KB for the CCP.COM copy at 0100h and the future Interrupt and Trap Vector table at address 1000h). My BOOT routine also clears memory from 0000..13ffh in bank 0. I was thinking of populating the Z80 restart vectors as entry points to my BIOSDBG routine but haven't gotten around to/needed to do that yet.

Tony
  • Attachment: BANKED1.DAT
    (Size: 2.29KB, Downloaded 253 times)


--
Tony Nicholson

[Updated on: Sat, 10 November 2018 18:05]

Report message to a moderator

Re: Interested in a Z280 SBC [message #5463 is a reply to message #5462] Sat, 10 November 2018 17:37 Go to previous messageGo to next message
agn453 is currently offline  agn453
Messages: 68
Registered: June 2018
Location: Newcastle, NSW, Australia
Member
BTW - I also found the attached program useful to walk the CP/M-Plus data structures and dump out the DPHs and DPBs on a running system (and to get buffer addresses generated by GENCPM).

Tony

Updated to the one I patched with DPB and DPH header information.
  • Attachment: CPM3ADD2.MAC
    (Size: 16.62KB, Downloaded 251 times)


--
Tony Nicholson

[Updated on: Sat, 10 November 2018 23:18]

Report message to a moderator

Re: Interested in a Z280 SBC [message #5464 is a reply to message #5463] Sat, 10 November 2018 18:00 Go to previous messageGo to next message
plasmo is currently online  plasmo
Messages: 876
Registered: March 2017
Location: New Mexico, USA
Senior Member
I'm trying to catch up, you guys are way ahead of me. I was unsuccessful with banked CPM Plus on Z280 six months ago, but recently I built a ROMless Z80 SBC similar to Z280RC but with simplified hardware bank selects and was successful porting banked CP/M Plus to it (relying on GENCPM to generate data, directory buffers, hash tables, and ALV). That was my stepping stone to Z280 so I'm ready to tackle CP/M Plus for Z280 now!
Bill
Re: Interested in a Z280 SBC [message #5465 is a reply to message #5461] Sat, 10 November 2018 18:31 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
Nice! Here's my boot with your gencpm.dat file:

3--CP/M3: 3 press Return to execute command

Boot LDRBIOS

CP/M V3.0 Loader
Copyright (C) 1998, Caldera Inc.

BNKBIOS3 SPR EF00 0B00
BNKBIOS3 SPR CC00 1400
RESBDOS3 SPR E900 0600
BNKBDOS3 SPR 9E00 2E00

58K TPA
Copyright 1979 (c) by Digital Research
CP/M Plus for z280rc 11/09/2018
8x 8 MByte CF disks and 1x 1.5 MByte RAM disk
A>dir
A: CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2!
A: CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2!
A: CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2!
A: CONSOLE OU : CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2! : CONSOLE OU
A: "+"]n9 "2! : CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2! : CONSOLE OU
A: CONSOLE OU : "+"]n9 "2! : "+"]n9 "2! : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2! : CONSOLE OU : CONSOLE OU
A: "+"]n9 "2! : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2! : CONSOLE OU : CONSOLE OU : "+"]n9 "2!
SYSTEM FILE(S) EXIST
A>dir [all]
A>date
A>d:date
Sat 11/10/2018 18:24:01

So I don't know what's going on with "dir"... a:date isn't Y2K... but the one on D: is...

I'm too paranoid to try any destructive commands (pip, save, etc.); show & ws4 hang...

I'll turn all the TRACE stuff back on and see what it's doing... Thanks for the gencpm.dat! ;-)
Re: Interested in a Z280 SBC [message #5466 is a reply to message #5465] Sat, 10 November 2018 23:27 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 Sun, 11 November 2018 13:31
Nice! Here's my boot with your gencpm.dat file:

3--CP/M3: 3 press Return to execute command

Boot LDRBIOS


[snip]
Quote:

A>dir
A: CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2!
A: CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2! : CONSOLE OU : "+"]n9 "2!


Looks like symptoms of.. I/O Page is for UART, then it's changed (or not changed to the CF I/O page) to read the next directory entry from the CF drive and is not restored back to UART to print the next directory entry.

[The CCP built-in DIR command interleaves console output with disk I/O to access the directory]

Tony

PS. I updated the CPM3ADD2.MAC program with the correct source-code (one that I had changed to print column headings for the DPH and DPB bytes)


--
Tony Nicholson

[Updated on: Sat, 10 November 2018 23:44]

Report message to a moderator

Re: Interested in a Z280 SBC [message #5467 is a reply to message #5466] Sat, 10 November 2018 23:49 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
>>Looks like symptoms of.. I/O Page is for UART, then it's changed (or not changed to the CF I/O page) to read the next directory entry from the CF drive and is not restored back to UART to print the next directory entry.

I could believe that except that it works fine when unbanked; my BIOS doesn't depend on the I/O page being set to any default value... it always sets it and then restores it to whatever it was previously... but I'll double check it tomorrow just to be sure. (At this point I'll just be happy if it would start working... ;-)
Re: Interested in a Z280 SBC [message #5468 is a reply to message #5467] Sun, 11 November 2018 00:58 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
The UART routines assume the UART I/O page is set... but I wrote wrappers to set/restore the UART I/O page around those calls... didn't make any difference. Sad
All the CF routines "do the right thing" (™; I/O page wise... ;-)

Re: Interested in a Z280 SBC [message #5469 is a reply to message #5468] Sun, 11 November 2018 04:16 Go to previous messageGo to next message
hperaza is currently offline  hperaza
Messages: 68
Registered: March 2017
Member
New version of the Z280 assembler just released (beta 10, download link same as before).

Fixes, changes, etc.:
  • SUBTTL no longer forces a page break.
  • bug fix: a line containing a label inside a false conditional section was mistakenly being output to the listing when false conditionals were suppressed if list xmacros was active.
  • bug fix: IF statements with undefined arguments were displayed with a missing 'U' error flag.
  • An attempt to a documentation is included in the package, using the M80 docs as starting point.
At this point the assembler is nearly complete (only a couple of small details need polishing), and virtually bug free (at least the Z80/Z180 code generation). In fact, this is the assembler I use nowadays for all my Z80/Z180/Z280-related projects, replacing my old trusty M80.
Re: Interested in a Z280 SBC [message #5470 is a reply to message #5469] Sun, 11 November 2018 06:34 Go to previous messageGo to next message
b1ackmai1er is currently offline  b1ackmai1er
Messages: 396
Registered: November 2017
Senior Member
Nice work Smile and especiallywell done for taking the effort puts some docs together,

Would love to see how much of ROMWBW this will assemble.

Suggest adding to the front on the manual the intended platform. It may not be immediately obvious to people that this is intended to run on CP/M rather than DOS.

Regards Phil
Re: Interested in a Z280 SBC [message #5471 is a reply to message #5468] Sun, 11 November 2018 11:49 Go to previous messageGo to next message
hperaza is currently offline  hperaza
Messages: 68
Registered: March 2017
Member
geowar1 wrote on Sun, 11 November 2018 00:58
The UART routines assume the UART I/O page is set... but I wrote wrappers to set/restore the UART I/O page around those calls... didn't make any difference. :(
All the CF routines "do the right thing" (™; I/O page wise... ;-)

Just had a quick look at your BIOS source code noticed that you define an 'outjmp' macro that expands to 3 NOPs. Should be 4. Not sure if the bug is triggering in your case, but is certainly something to watch out for. Tony Nicholson's BIOS has the same problem.
Re: Interested in a Z280 SBC [message #5472 is a reply to message #5471] Sun, 11 November 2018 12:30 Go to previous messageGo to next message
agn453 is currently offline  agn453
Messages: 68
Registered: June 2018
Location: Newcastle, NSW, Australia
Member
hperaza wrote on Mon, 12 November 2018 06:49


Just had a quick look at your BIOS source code noticed that you define an 'outjmp' macro that expands to 3 NOPs. Should be 4. Not sure if the bug is triggering in your case, but is certainly something to watch out for. Tony Nicholson's BIOS has the same problem.


Thanks for taking a look at this Hector. Much appreciated.

I have just re-built my BIOS with the extra NOP in the outjmp macro - and tried it. My tests of a banked memory configuration are still failing.

The OUTJMP Pascal source file suggests that at least one "normal" op-code be inserted between an OUT and a JP-style instruction. Telmann Reh also suggests re-coding to a subroutine CALL/RET or using an IN instruction.

I have also tried setting the Z280's cache-mode off to circumvent this possible issue to no effect!

I know a banked system works on the CPU280 hardware - so I'm going to look closely at its BIOS routines again for any other quirky work-arounds.

Does anyone have a copy of the actual Zilog Errata-sheets for the Z280? I have a scanned copy of the August 1987 one that only talks about cache-corruption while in Z80-bus compatible mode. The Z280RC board is using 16-bit Z-BUS mode so this shouldn't apply.

Tony


--
Tony Nicholson

[Updated on: Sun, 11 November 2018 12:49]

Report message to a moderator

Re: Interested in a Z280 SBC [message #5473 is a reply to message #5472] Sun, 11 November 2018 17:18 Go to previous messageGo to next message
plasmo is currently online  plasmo
Messages: 876
Registered: March 2017
Location: New Mexico, USA
Senior Member
I have not encountered the OUTJMP bug. From what I've read, it has to do with the insertion of many wait states in I/O access AND older mask of Z280. Z280RC has no wait state in the I/O accesses and uses Z280 with date code of 1992 or later. If you've found occurrences of OUTJMP bug on Z280RC, please send me samples of software.

Since I have no prior experiences with banked version of CP/M Plus, I want to 'sneak up' on it one step at a time. I'm starting with my non-banked version of CP/M Plus and relied on GENCPM as much as possible. I have a mostly-working banked version that relies on GENCPM to generate ALV, HASH table, DIRBCB, DTABCB, and XMOVE. It is rather slow because there is no XMOVE function. It has problems with RAMdisk but seems to work well with CF drives. I'm going to work on the XMOVE routine next. The BIOS is attached, you may notice it has no OUTJMP workaround.
Bill
Re: Interested in a Z280 SBC [message #5474 is a reply to message #5473] Sun, 11 November 2018 17:40 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
Hey BillS!,
The CBIOS3B.280 that I'm modifying (that originally came from you!Wink has the outjmp macro (to insert 3 nop's) and uses them... but if you say they're not needed...
AFAIK it doesn't have any RAMdisk issues that I know of...

Looking thru your sources...
What's all the work you're doing in selmem instead of just "cp a,(curBank)'? Why? Hummmm... are you not using ZSM4? (so no Z280 instructions?Wink
Everything else looks pretty much the same as mine...
Re: Interested in a Z280 SBC [message #5475 is a reply to message #5473] Sun, 11 November 2018 19:11 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
plasmo wrote on Sun, 11 November 2018 17:18
I have not encountered the OUTJMP bug. From what I've read, it has to do with the insertion of many wait states in I/O access AND older mask of Z280. Z280RC has no wait state in the I/O accesses and uses Z280 with date code of 1992 or later. If you've found occurrences of OUTJMP bug on Z280RC, please send me samples of software.

Since I have no prior experiences with banked version of CP/M Plus, I want to 'sneak up' on it one step at a time. I'm starting with my non-banked version of CP/M Plus and relied on GENCPM as much as possible. I have a mostly-working banked version that relies on GENCPM to generate ALV, HASH table, DIRBCB, DTABCB, and XMOVE. It is rather slow because there is no XMOVE function. It has problems with RAMdisk but seems to work well with CF drives. I'm going to work on the XMOVE routine next. The BIOS is attached, you may notice it has no OUTJMP workaround.
Bill


Hey BillS!,
I just built this (with ZSM4b10)... this is what I get on boot:

3--CP/M3: 3 press Return to execute command

Boot LDRBIOS
    .
    .
    .
    .
CP/M V3.0 Loader
Copyright (C) 1998, Caldera Inc.    

 BNKBIOS3 SPR  F900  0700
 BNKBIOS3 SPR  C000  0000
 RESBDOS3 SPR  F300  0600
 BNKBDOS3 SPR  9200  2E00
 
 60K TPA

### BIOS has bad sector in CCP.COM
### BIOS has bad sector in CCP.COM
### BIOS has bad sector in CCP.COM
    .
    .
    .


Note the BNKBIOS3.SPR addresses & sizes are different... Can you post the GENCPM.DAT file you used?
I don't know how it can say "bad sector"; your BIOS::READ: function only returns zero (xor a).

[Updated on: Sun, 11 November 2018 19:12]

Report message to a moderator

Re: Interested in a Z280 SBC [message #5476 is a reply to message #5475] Sun, 11 November 2018 19:49 Go to previous messageGo to next message
plasmo is currently online  plasmo
Messages: 876
Registered: March 2017
Location: New Mexico, USA
Senior Member
George,
In the early stage of my Z280 development, I was worried about the OUTJMP bug and whenever I had I/O problems, I'd insert a string of NOP's but that had never made any differences. I no longer worry about the OUTJMP issue, whether it is configured in the 16-bit ZBus mode or the 8-bit Z80-compatible mode.

I have not used ZSM4 except to assemble your code and Tony's (agn453) code. I normally use ZMAC on my PC and XMODEM the .rel file to Z280RC where it is linked and GENCPM-ed. Link command is:

link bnkbios3[b]=cbios3,scb

Attached is the gencpm.dat
Bill

[Updated on: Sun, 11 November 2018 19:50]

Report message to a moderator

Re: Interested in a Z280 SBC [message #5477 is a reply to message #5476] Sun, 11 November 2018 21:49 Go to previous messageGo to next message
agn453 is currently offline  agn453
Messages: 68
Registered: June 2018
Location: Newcastle, NSW, Australia
Member
Some progress with my BIOS for the Z280RC...

The DMA transfer routine (DMAXFR) seemed to be spuriously ignoring to transfer random 128-byte blocks between memory banks.

I re-worked the interbank memory move to use the memory mangement unit instead of DMA and this showed up the issue. Subsequently I re-coded the DMAXFR routine according the the procedure outlined in the preliminary Z280 technical manual (page 9-15 section 9.5.7) and added code to make sure the DMA Transaction Descriptor had no ENable bit while setting it up.

All this has fixed the Banked version that uses just bank 0 and 1 - see below (except for CP/M 3 PIP's verify error). The multi-bank version is still not working though.

Tony

PS: Updated sources are at https://github.com/agn453/Z280RC


C>test
A:TEST     COM

Z280RC LDRBIOS 12-Nov-2018

CPMLDR3 - CP/M V3.0 Loader
Copyright (C) 1982, Digital Research

 RESBIOS3 SPR  F400  0C00
 BNKBIOS3 SPR  CB00  1500
 RESBDOS3 SPR  EE00  0600
 BNKBDOS3 SPR  9D00  2E00

 59K TPA

Z280RC Banked BIOS 12-Nov-2018

BIOSDBG active.
Use (C)ontinue to enter CP/M.
Typing <CTRL-P> re-enters BIOSDBG from console input.

Display Bank 01
@C

C>; C:PROFILE.SUB
C>d:setdef * d: c: a: [order=(com,sub) display page uk]

Drive Search Path:
1st Drive            - Default
2nd Drive            - D:
3rd Drive            - C:
4th Drive            - A:

Search Order         - COM, SUB
Console Page Mode    - On
Program Name Display - On
Date format used     - UK

C>date
D:DATE     COM
Mon 12/11/2018 16:31:17
C>m2:
2M>era *.*
ERASE *.* (Y/N)? y
2M>nulu c:ppip18
A:NULU     COM  (User 0)
NULU 1.52  (07/12/87)
Copyright (C) 1984, 1985 & 1987 by Martin Murray
Bug fixes in version 1.52 by Mick Waters

TYPE -H FOR HELP


Drive M: Total 1520k, Used 0k, Free 1520k

Library C2:PPIP18.LBR open.
(Buffer size: 309 sectors)
Active entries: 18, Deleted: 0, Free: 2, Total: 20.
-READY M2:>-e *.*
Extracting...
  PPIP    .COM to M2:PPIP    .COM
  PPIP    .DZC to M2:PPIP    .DZC
  PPIP-0  .ZZ0 to M2:PPIP-0  .ZZ0
  PPIP-1  .ZZ0 to M2:PPIP-1  .ZZ0
  PPIP-2  .ZZ0 to M2:PPIP-2  .ZZ0
  PPIP-3  .ZZ0 to M2:PPIP-3  .ZZ0
  PPIP-4  .ZZ0 to M2:PPIP-4  .ZZ0
  PPIP-5  .ZZ0 to M2:PPIP-5  .ZZ0
  PPIP-5ZD.ZZ0 to M2:PPIP-5ZD.ZZ0
  PPIP-7  .ZZ0 to M2:PPIP-7  .ZZ0
  PPIP-8  .ZZ0 to M2:PPIP-8  .ZZ0
  PPIP-9  .ZZ0 to M2:PPIP-9  .ZZ0
  PPIP-Z  .COM to M2:PPIP-Z  .COM
  PPIP-ZD .COM to M2:PPIP-ZD .COM
  PPIP18  .FOR to M2:PPIP18  .FOR
  PPIP18  .ZZ0 to M2:PPIP18  .ZZ0
  READ    .MZ  to M2:READ    .MZ
-Extract members M2:>-x

Closing C2:PPIP18.LBR...


2M>uncr *.*
A:UNCR     COM  (User 0)
GEL Uncruncher  Version 2.8
----
 M2:PPIP.DZC      ==> M2:PPIP.DOC
  in    out   rat   ca    cr
 ====  ====  ====  ====  ====
   74 / 154  208%  4096  1986 (  10k -->   20k)
----
 M2:PPIP-0.ZZ0    ==> M2:PPIP-0.Z80
  in    out   rat   ca    cr
 ====  ====  ====  ====  ====
   62 / 126  203%  4096  1205 (   8k -->   16k)
----
 M2:PPIP-1.ZZ0    ==> M2:PPIP-1.Z80
  in    out   rat   ca    cr
 ====  ====  ====  ====  ====
   32 /  68  213%  3161     0 (   4k -->    9k)
----
 M2:PPIP-2.ZZ0    ==> M2:PPIP-2.Z80
  in    out   rat   ca    cr
 ====  ====  ====  ====  ====
   47 / 102  217%  4096   271 (   6k -->   13k)
----
 M2:PPIP-3.ZZ0    ==> M2:PPIP-3.Z80
  in    out   rat   ca    cr
 ====  ====  ====  ====  ====
   55 / 128  233%  4096   733 (   7k -->   16k)
----
 M2:PPIP-4.ZZ0    ==> M2:PPIP-4.Z80
  in    out   rat   ca    cr
 ====  ====  ====  ====  ====
   14 /  26  186%  1630     0 (   2k -->    4k)
----
 M2:PPIP-5.ZZ0    ==> M2:PPIP-5.Z80
  in    out   rat   ca    cr
 ====  ====  ====  ====  ====
   36 /  76  211%  3471     0 (   5k -->   10k)
----
 M2:PPIP-5ZD.ZZ0  ==> M2:PPIP-5ZD.Z80
  in    out   rat   ca    cr
 ====  ====  ====  ====  ====
    5 /   7  140%   679     0 (   1k -->    1k)
----
 M2:PPIP-7.ZZ0    ==> M2:PPIP-7.Z80
  in    out   rat   ca    cr
 ====  ====  ====  ====  ====
   37 /  77  208%  3554     0 (   5k -->   10k)
----
 M2:PPIP-8.ZZ0    ==> M2:PPIP-8.Z80
  in    out   rat   ca    cr
 ====  ====  ====  ====  ====
   42 /  86  205%  4022     0 (   6k -->   11k)
----
 M2:PPIP-9.ZZ0    ==> M2:PPIP-9.Z80
  in    out   rat   ca    cr
 ====  ====  ====  ====  ====
   17 /  32  188%  1851     0 (   3k -->    4k)
----
 M2:PPIP18.ZZ0    ==> M2:PPIP18.Z80
  in    out   rat   ca    cr
 ====  ====  ====  ====  ====
   43 /  79  184%  4096     9 (   6k -->   10k)
----
 M2:READ.MZ       ==> M2:READ.ME
  in    out   rat   ca    cr
 ====  ====  ====  ====  ====
    7 /  11  157%   962     0 (   1k -->    2k)

  13 files processed.
2M>type ppip.doc

PPIP.DOC                    07/15/88                             Page 1
------------------------------------------------------------------------
               Documentation for the PPIP program
------------------------------------------------------------------------

                            OVERVIEW
                            --------

PPIP is a file copy program for use with CP/M 80.  It was written to
supplement, not replace, SWEEP, NSWP or PIP.  If you want to copy or
backup just a few files, you can do so with PPIP and you won't have to
wait for SWEEP, VFILER, etc. to load and start.  In addition, PPIP can
be included in SUBMIT files.  PPIP.COM occupies less than 4K.

PPIP has the ability, unlike most copy programs, to PUSH or PULL files
between user areas. Areas from 0 to 31 are supported.

Wildcards are accepted for BOTH the source and destination file names.
This is another feature that gives you flexibility not offered by most
other copy programs.

Press RETURN to Continue
2M>m1:
1M>dir
No File
1M>pip m:=c:*.*[v]
D:PIP      COM  (User 0)

COPYING -
@BIOS280
CRCKLIST.CRC
BANKBIOS.LOG
BANKBIOS.SUB
BANKED.DAT
BANKED1.DAT
BDOS3.SPD
BDOS3.SPR
BIOS3.SPR
BIOS3.SYM
BIOSDBG.LST
BIOSDBG.REL
BIOSDBG.MAC
BIOSDBG.PR1
ERROR: VERIFY  - M:BIOSDBG.$$$

1M>



--
Tony Nicholson

[Updated on: Sun, 11 November 2018 21:59]

Report message to a moderator

Re: Interested in a Z280 SBC [message #5478 is a reply to message #5477] Sun, 11 November 2018 22:27 Go to previous messageGo to next message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
>>> The DMA transfer routine (DMAXFR) seemed to be spuriously ignoring some random 128-byte block transfers between memory banks.

Is your source online somewhere? I'd like to see if I'm doing it the same way... I've beat on my DMA code... ran DMA/MMU tests overnight with very paranoid error checking... without errors... (or so I thought... ;-)

I've attached my (very modified version of BillS's) cbios3c.280 and the files necessary to build it (excluding those from the DRI distribution).

bs.sub builds non-banked.
bb.sub builds banked.
bl.sub build cpmldr (non-banked)

Note: I'm using zsm4 (beta 10) on the z280rc system... (booted in non-banked mode).
  • Attachment: Archive.zip
    (Size: 24.70KB, Downloaded 264 times)

[Updated on: Sun, 11 November 2018 22:54] by Moderator

Report message to a moderator

Re: Interested in a Z280 SBC [message #5479 is a reply to message #5478] Sun, 11 November 2018 22:42 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 Mon, 12 November 2018 17:27
>>> The DMA transfer routine (DMAXFR) seemed to be spuriously ignoring to transfer random 128-byte blocks between memory banks.

Is your source online somewhere? I'd like to see if I'm doing it the same way... I've beat on my DMA code... ran DMA/MMU tests overnight with very paranoid error checking... without errors... (or so I thought... ;-)


See attached source-code snapshot in a zip file.

They're on github too at https://github.com/agn453/Z280RC in the system/bios280 directory.

Tony
  • Attachment: bios280.zip
    (Size: 168.99KB, Downloaded 246 times)


--
Tony Nicholson
Re: Interested in a Z280 SBC [message #5481 is a reply to message #1189] Mon, 12 November 2018 06:45 Go to previous messageGo to next message
lowen is currently offline  lowen
Messages: 226
Registered: August 2016
Location: Western NC USA
Senior Member
A quick aside: I am thrilled to see all this activity! I personally haven't done the banked CP/M Plus porting (I have just worked on the hardware side thus far) but I'm following closely and learning a few things as I read. Thanks guys!

--
Bughlt: Sckmud
Shut her down Scotty, she's sucking mud again!
Re: Interested in a Z280 SBC [message #5482 is a reply to message #5481] Mon, 12 November 2018 07:05 Go to previous messageGo to next message
plasmo is currently online  plasmo
Messages: 876
Registered: March 2017
Location: New Mexico, USA
Senior Member
I have coded up XMOVE using DMA and it is running. I still use GENCPM to take care of HASH, ALV, DIRBCB and DTABCB. I now ran into the same problem Tony has, i.e., when pip large file (help.hlp is my test file), it can't verify. However, I can pip small files without any issue. The one GENCPM option that seems to solve the problem is answering 'N' to the question 'Allocate buffers outside of Common (Y) ?'. I set up the disks with different combination of directory buffers, data buffers, and allocate buffers outside of common. Only the disks that have outside allocated buffers failed write verify. I'm using 3 banks of memory.
Bill
PS, I'm going to port the same software (slightly modified) to Z280 running in 8-bit Z80-compatible bus (https://github.com/Plasmode/ZZ80RCWink and see if it has the same problem.
Re: Interested in a Z280 SBC [message #5483 is a reply to message #5482] Mon, 12 November 2018 09:22 Go to previous messageGo to previous message
geowar1 is currently offline  geowar1
Messages: 41
Registered: October 2018
Member
FYI: While debugging last night I ran across a case where pip failed also... playing with it it appeared that everything was fine until the 3rd 128-byte (sub?)sector... then the rest of the file was... just wrong. (do a pip without the verify and then compare the results. diffs start at offset 768. Rest of file is bad.Wink
I verified this on both the CF and RAM disks. This was unbanked CP/M Plus (but using full banked bios with ccp DMA'd to TPA in bank one). Tried it with w/wo outjmp nog's; cache on/off... still failed...

This morning I've been unable to reproduce... I haven't a clue how I "fixed" it.
Previous Topic: New TI Project
Next Topic: Z180 upd7220 GDC SBC


Current Time: Fri Apr 19 13:16:02 PDT 2024

Total time taken to generate the page: 0.01443 seconds