开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: FORMATTING THE uSD

 

Thanks Lee.

I used parted to examine the uSD and discovered it was basic fat 16.

I come from a time when a ST506 (5MB) seemed like more space than usable..
That lasted maybe a month.? Most systems with disk I found more than 60mb?
was more than excess and a 128MB CF being largely unused.

Two limits for that...
One is CP/M 2 max file system size is 8MB (65535 sectors max).
The other is each drive eats about 256bytes for the allocation map and with 64K ram, one word, ouch.

The common solution was some utility to allow for one drive as system and up to
three mapped (MOUNTED) in as needed.

For larger file systems CPM3 or the clones P2dos, Novados, Zrdos, or Zsystem
fixed an internal BDOS bug (and enhanced many things) and allows for up to
262144 sectors (logical 128 byte) or 33MB but the solution came with a directory
that could take a while to parse.? A penalty of a flat file system.

Generally for large media (IDE, CF and SD) that is LBA addressed
I use:
?Sectors= (alloc/128)/4 as, or 8 physical sectors per track
?8MB logical disk? (8mb/4096 alloc size) for 2048 Tracks.

CP/M actually passes a 16bit value for track and sector passed
in register pair BC.? Sector is typically less than 256 and track
can be as high as needed to address 8MB total.

That allows for a new logical partition spaced every 16384
physical sectors ((2048 * 4096= 8MB))/512= 16384 physical
sectors.?

Also CHKS is a checksum for directory to lock out possible
floppy changes mid operation.? For most systems with fixed
media (SD qualifies) the value is 0 (zero).

The only headache for CP/M Z80 is track and sector (logical 128)
is 16bit values, aka one track of 1 local sector * 65536 tracks, or?
256 sectors * 256 tracks, or and combination that multiplies
out to 16bit (65535) without overflow.? So for devices larger?
the offset is applied per drive number with 24 or 32 bit math
added to create a LBA value large enough for the device in use.

The application of this is for a 128MB CF that's 262144
512 byte physical sectors. or 16384 physical sectors
per 8MB logical disk. since they can be addressed from
LBA 0000 each logical disk starts every 16384 logical
sectors for a total of 16 possible logical drives.

ITs then a simple matter of adding (32bit) 16384 (0x004000)
For each logical drive (at the Bios level) or 0x004000 * drive
number. Its easily handled using a BIOS internal table that
the external BDOS does not access.

I keep it simple as since the whole initial system loads from
Eprom to ram that leaves out "system" tracks completely.
A simplification.? If that system needs upgrade the easy
way load a file and overlay the existing system, a handy
way to load improved CCP, BDOS or BIOS.

What I can't imagine is using a large device (more than 8mb)?
as a bunch of 8"SSSD floppies (241KB useable space)?
The acid test for disk adequacy is:

ASM cpm22.BCD? ? ; assemble a large version of CPM fully commented at 104KB
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? : source on B, hex on C, and PRN on D
FYI the resulting PRN file barely fits on a empty 8"SSSD floppy.??
That's why everyone from then want the largest disks possible.
Also why I started down the hard disk path in 1980 as even 2SDD 8" (1mb)
was still slowing me down and a 4 drive box was heavy, huge, and loud!


Allison


Re: FORMATTING THE uSD

 

It apparently does but that is not helpful.

Man page on my system says the same thing save for I get...
? :mkfs.fat: unable to open /dev/sdb: No medium found
Same for all variants of? sdb (stick)...? /dev/sdb et al

Its a known good lexar 1GB stick formatted as ext4 that I could afford to break.

What's notable is once done its a one time use.? I will load a utility to do
what many?here use xmodem for.? The difference is my code is on all the other
dozen or so CP/M system I have and they talk nicely via serial line. Its a flavor
of Wong's (w Wong , October, 1983 Microsystems) network? ?Simply party line
network (think 9600baud csma/cd).


Allison


Re: A Z80 Asm rec

 

I used DRI's MAC80 and Microsoft's M80 for most of my Z80 programming. Later I got the SLR180 assembler, which was the fastest and most versatile Z80 assembler.? I used it to write a lot of code for the Heath H19 terminal (which was Z80-based).

?

Josh used the ASMX 2.0 assembler from Herb Johnson's website as-is. It also works for me as-is, but I haven't tried to recompile it.

?

> ...a different approach so that the Z80MC teamed with a portable terminal> emulation (not A PC) to make a portable system with enough performance> to assemble CP/M itself.

?

I've actually designed a Z80 terminal to pair with the Z80MC; but haven't gotten around to laying out the PCB yet. I wrote new firmware for the Heath H19 terminal that included quite a few features, and would like to re-use that code. Unanswered questions are a) what do to for a keyboard, and b) what to use for a screen.

?

For the keyboard, I don't want to use expensive modern switches or the keyboard alone will be big and cost over $100. So I'm thinking of something more like the Radio Shack model 100 keyboard, which had full size type-able keys but was fairly small and portable.

?

The screen will probably have to be LCD, as nothing else exists any more. But so many of them are "one-time wonders" that are available today, but not tomorrow.

?

Lee

--

Excellence does not require perfection. -- Henry James

--

Lee A. Hart

?


Re: FORMATTING THE uSD

 

Hi Allison,

?

Yes, the SD-card has to be formatted FAT16. This is also why you can't use cards over 2 Gb. It's hard for me to imagine needing over 2 Gb on a computer as small as the Z80MC!

?

Since small cards are getting rare and modern PCs often make it difficult or impossible to format FAT16, I include a 2 Gb SD-card, and format it in FAT16 for you.

?

I agree that the SD-card socket and USB-to-SD-card adapter supplied with the kit are poor (Chinese quality). But that's about all I can find these days. :-(

?

I'm trying to follow the file size/format discussions, but don't really have a clue about how the internals of CP/M disk formats work. But I should mention that there is a *lot* of RAM on the Z80MC. The Z80-SIO comes with a 128K RAM, of which only 32k is in use. And it has jumpers and bank-switching logic to use a 512k RAM instead.

?

Happy New Year!

Lee

--

Excellence does not require perfection. -- Henry James

--

Lee A. Hart

-----Original Message-----
From: <[email protected]>
Sent: Dec 31, 2023 8:26 PM
To: <[email protected]>
Subject: [Z80MC] FORMATTING THE uSD

?

The supplied uSD with the Z80MC according to the docs must be formatted FAT16...

Mine out of the box has a label Z80-SIO... a good thing but was it formatted to FAT 16?

If not I have one more system to try, an older 32bit running Ubuntu 12 to try as all
the others do not offer FAT16 formatting.??

Suggestions....


Allison

?


Re: FORMATTING THE uSD

 

开云体育

I'm pretty sure mkfs.fat will create a FAT16 disk -- from the man page, "mkfs.fat? is? used? to? create an MS-DOS filesystem under Linux on a device".

-Bob


On 12/31/23 21:26, ajparent1/kb1gmx wrote:

The supplied uSD with the Z80MC according to the docs must be formatted FAT16...

Mine out of the box has a label Z80-SIO... a good thing but was it formatted to FAT 16?

If not I have one more system to try, an older 32bit running Ubuntu 12 to try as all
the others do not offer FAT16 formatting.??

Suggestions....


Allison


Re: FORMATTING THE uSD

 

If it's not FAT16, the SD Init will fail and let you know it's a bad partition type.?




On Sunday, December 31, 2023 at 11:27:29 p.m. EST, ajparent1/kb1gmx <kb1gmx@...> wrote:


Problem solved... Used a old(CA 2004) Compaq pentium based machine running?
NT4 that would do FAT16.??

However the drd was already formatted fat 16.

Solved.


Re: FORMATTING THE uSD

 

Problem solved... Used a old(CA 2004) Compaq pentium based machine running?
NT4 that would do FAT16.??

However the drd was already formatted fat 16.

Solved.


FORMATTING THE uSD

 

The supplied uSD with the Z80MC according to the docs must be formatted FAT16...

Mine out of the box has a label Z80-SIO... a good thing but was it formatted to FAT 16?

If not I have one more system to try, an older 32bit running Ubuntu 12 to try as all
the others do not offer FAT16 formatting.??

Suggestions....


Allison


Re: A Z80 Asm rec

 

Oddly the Zip files I found none had a manual...??
Then again I was looking for a TXT or DOC and it was HTML..
Oddly neither Herbs note or the HTML explain why H(val) or
HIGH (VAL) does not behave as they are documented.

As a result I'll do the mask and shift as that was easy to implement and
compatible with assemblers on the CP/M systems and under MyZ80 sim. I
do that as my collection of CP/M machines is both large and frequently in
use.? Code portability is fairly important to me as I'm supporting
8080/8085/z80/Z180/Z280 systems and CP/M 1.4 though CPM3(cpm+).
Of course I don't expect the 8080/8085 machines to run Z80 code but
producing using suitable assembler is something I have done before.

This takes me back to the early 80s when, if the floppy format (or size)
wasn't the issue, the text and assembler formats were.? CP/M in 1980
suffered from?portability issues.? Back then Z80 source could be in not
less than 4 formats extended 8080(intel) style opcodes, TDL opcodes
that were Intel 8080 like but different, Zilogs' manual, and?at least
three Z80 assemblers that all varied for syntax and pseudo ops.

So all this makes sense as to purpose the original plan was build
a generic BIOS without any FAT filesystem for uSD, based on
your work for the uSD handler and the Z80MC as the foundation to
side step hardware build.??Its also pretty slick Z80 build as it allows
for banked lower memory and three IO.??

The target is to modify one of my three Epson PX-8s with uSD as mass storage
to replace and be both larger and faster storage than the slow microcassette
that had failed in that one.? I've done it with CF but that is a bit more complex
hardware, larger, and uses more power.? ?The upside is the way to "install"
the device code in the software (BIOS) as transient (not part of the cold boot
image) was well developed by others and simple to implement.


Allison


Re: A Z80 Asm rec

 

Need to find out how ASMZ80 does it.? Perhaps you will need to mask the address and shift it?

LD L, LED_DISPLAY_SB & 0xFF
LD H, HIGH_SCAN_PTR >> 8

Need to read the ASMZ80 manual to see how they handle it.



On Friday, December 29, 2023 at 06:44:30 p.m. EST, ajparent1/kb1gmx <kb1gmx@...> wrote:


I thought I had the assembler used...

ASMZ80? does not digest the following:

? LD? L,LOW LED_DISPLAY_SB? ;Restart Pointer to Secondary Buffer
? LD ? ? ? ? H,HIGH SCAN_PTR
? OR? ? ? ? LOW LED_DISPLAY

Best guess is it extracts the LOW or HIGH byte of the address of that variable or the 16 bit variable.

Any other ways around this??


Allison


Re: A Z80 Asm rec

 

Never mind...? Even if the cross assembler were right I'd still have to heavily edit
the code for a CP/M native assembler.

I'd briefly considered feeding the ZASMV20 to BDS C compiler but it was
unlikely it would not fit in memory with enough working space.


Allison


Re: A Z80 Asm rec

 

I thought I had the assembler used...

ASMZ80? does not digest the following:

? LD? L,LOW LED_DISPLAY_SB? ;Restart Pointer to Secondary Buffer
? LD ? ? ? ? H,HIGH SCAN_PTR
? OR? ? ? ? LOW LED_DISPLAY

Best guess is it extracts the LOW or HIGH byte of the address of that variable or the 16 bit variable.

Any other ways around this??


Allison


Re: Z80 1st boot (wooot!)

 

Just a note there were versions of CP/M late in the game for Z8000 and 68000
that were the basic system written in C.? It turns out the 68K? had a instruction
set remarkably close to PDP11 and VAX which was the extension of the
PDP-11 16 bit CISC instruction set to 32bit.? The Z8000 a 16bit machine was
also closer to PDP-11 than Z80.

The cross compiler for those versions ran on DRCs VAX 11/750.?

Sources for asm and C versions are on line at Gaby's site.


Its familiar to me as I helped Tim create the the early compilations
back then mostly asm code and some PLM.

Allison


Re: Z80 1st boot (wooot!)

 

>>I would guess that if ever CP/M could run on a VAX, it would be an emulation. <<

A way late coooment as I didn't see it then...
I was a digit, aka DEC employee and lived in the central engineering world.
I got to see a lot of really cool stuff.

It was available three ways:

+Using the SIMH CPU/system emulator.
+There was a third party board that plugged into a VAX backplane and provide direct execution
?on z80 and the VMS OS provided disk and terminal IO services..
+ and some crazy guy used the CP/M 68K sources that were written in C and made a version
?that booted natively on a VMX (microVAX 3100) He was a member of the NETBSD on VAX?
?development team.

+ Actually there was also a version using the 68K C code that ran as a user application.
? It required VMS as it was a user application rather than booting on the base sysytem.



Another SBC And...

 
Edited

years (many) I built a xz80 machine around the Z80/dart/CTC/eprom and ram
and as a change up for early 80s 1982 end of year to be precise...?
BM? bubble memory actually magnetic bubble memory.? I was lucky
enough to get two BPK7720 bubble memory boards each doing 128Kbyes.
Cost was about the same as a 5.25" floppy drive.? ?The Intel part with
supporting ICs was 1980s tech not in existance in the 70s.? TI had the
magnetics part earlier but the supporting ICs so it took a lot to make
their part work and it first appear as local memory in the Silent 700
series as?replacement for ASR33 TTY.? The later 745 had a
bubble memory for local storage for later transmission.

What brought that to mind is Scott Bakers revisit...


I still have the system I built up, and its operational.? All three boards
two BMC (256KB storage) and Z80SBC.? The downside for BM system
was high power drain when active and it wasn't very fast compared to
an average floppy.? It did run CP/M-V2.2.? IT highlighted the problem
of CP/M, floppy sized disks are too small.? To save as much of the
BM for storage the whole monitor, OS, and Bios was loaded into
the first 16K (27128) part available then rather than loaded from disk.

Building physically small systems that are high performing at the
single board level has been a long time thing.? The things that made
Z80MC and similar possible was larger rams?(32k bytes and larger),
large Eproms, and enough integration of IO (Z80 dart/SIO) to cut
the parts count to very few mostly glue parts.

The addition of uSD makes for smaller but lots of storage, CMOS?
parts like Z80, SIO, and other parts in the early 80s made
battery power a practical enterprise.


Allsion


Re: A Z80 Asm rec

 

I'm running it on X64 linux using dosbox.? A Dell I5 5440 and linux on it is
Mint 21.3 64bit.

FYI got amsx to run...? it was far to dumb.? I really didn't expect it to be that simple!
The Zip had an .exe file and I'd been reading all the text about building it.? Turns
out asmx.exe is directly executable .? ?So all I needed to do was put it in a
convenient directory and CD to it and type the required incantation:

$asmx -C z80 -Llistfile.prn zmcV15?

Now assembles clean.?


Bed time...my head hurts.

Allison


Re: A Z80 Asm rec

 

开云体育

MyZ80 is an excellent emulator. I wish the code existed somewhere — I’d love to port it for x64.?

Rich?

http://cini.classiccmp.org/
Long Island S100 User’s Group

Get for iOS


From: [email protected] <[email protected]> on behalf of ajparent1/kb1gmx <kb1gmx@...>
Sent: Saturday, December 23, 2023 10:19:41 PM
To: [email protected] <[email protected]>
Subject: Re: [Z80MC] A Z80 Asm rec
?
Hi Rich,

Been doing asm code since my first Altair...
TASM I have it.? Good assembler.

Its one of the dozen on the AMproLB+, S100 crates (both compupro and NS* horizon chassis),
Kaypro4/84, and YAZBC )(yet another Z80 single board computer).

For Z80 I generally develop on MyZ80 CP/M emulator on PCs rather than directly
cross platform.? The emulator provides a fully valid and well tested z80 and
CP/M environment.? By tested I've used it for over 20 years.

What am I trying to do... simplify the uSD interface (software) for performance and as
an abstracted block device for OS experiments other than CP/M.? Over all a different
approach so that the Z80MC teamed with a portable terminal emulation (not A PC)
to make a portable system with enough performance to assemble CP/M itself.

The whole of asmx2.x has been not getting it to behave (run/Install) on Linux PC.
No success so far and it would be nice to have a very fast assembler that is
was used for ZMCv15.? Its proven to be very frustrating, unusually so.


Allison


Re: A Z80 Asm rec

 

Hi Rich,

Been doing asm code since my first Altair...
TASM I have it.? Good assembler.

Its one of the dozen on the AMproLB+, S100 crates (both compupro and NS* horizon chassis),
Kaypro4/84, and YAZBC )(yet another Z80 single board computer).

For Z80 I generally develop on MyZ80 CP/M emulator on PCs rather than directly
cross platform.? The emulator provides a fully valid and well tested z80 and
CP/M environment.? By tested I've used it for over 20 years.

What am I trying to do... simplify the uSD interface (software) for performance and as
an abstracted block device for OS experiments other than CP/M.? Over all a different
approach so that the Z80MC teamed with a portable terminal emulation (not A PC)
to make a portable system with enough performance to assemble CP/M itself.

The whole of asmx2.x has been not getting it to behave (run/Install) on Linux PC.
No success so far and it would be nice to have a very fast assembler that is
was used for ZMCv15.? Its proven to be very frustrating, unusually so.


Allison


Re: A Z80 Asm rec

 

One of the assemblers I saw mentioned above is one I particularly like: TASM. Multi-target, multiple host versions (DOS, Win32, Win64). It has been my go-to for over 20 years, although I've used a bunch of others, mostly because I don't want to re-write the original source to fix syntax, etc. Beyond that, I use NASM, MASM, various gcc compilers for different projects. Obviously some are more flexible than others and/or have different features needed for a specific purpose. For one project, I had to even dip into an original ASM from Seattle Computer because it had a unique encoding method that was needed for a specific recreation project.

Rich Cini


Re: A Z80 Asm rec

 

Josh,

7400 lines for ZMCV15 according to my editor.
The only assembler under CP/M Z80asm (SLR) that wasn't 1005 fail found 3880 lines
with syntax or opcode errors.? The other was Z80MR and it was really unhappy with
the format.? ?ZASMC (cromemco) assembler didn't like the format.? Line ends
incomparable even after passing through FIXCRLF.? Most interesting error message
was "Line 5 trash after CR"? nothing visible to linux editor or Vteco on CP/M system.

ASMX is a path of frustration.?

It may be an easier path to my goal to start from scratch.? I was hoping to mod ZMCv15
for my uses.

Allison