CP/M 3 System Generation

Alles rund um CP/M Plus/3.0
Antworten
SolderGirl
Beiträge: 8
Registriert: 20. Mai 2024, 17:56

CP/M 3 System Generation

Beitrag von SolderGirl » 9. Jun 2024, 11:46

Ich habe ein paar bugs in meinem BIOS, und wollte testweise das gesamte BIOS ins Common Memory Segment verschieben. Laut dem CP/M 3 System Guide sollten die Teile des Codes die mit CSEG markiert sind im Common Memory platziert werden, die mit DSEG markierten ins Banked Memory.
Allerdings muss ich feststellen das GENCPM 8960 Bytes meines BIOS ins Banked Memory platziert, obwohl der Linker ganz deutlich 0 Bytes für "Data Size" aka DSEG angegeben sind.

Ist hier jemand der sich etwas tiefer damit auskennt wie GENCPM die Segmente aufteilt?

genie3s
Beiträge: 100
Registriert: 1. Sep 2019, 16:49

Re: CP/M 3 System Generation

Beitrag von genie3s » 11. Jun 2024, 15:04

Du musst ein nonebanked CP/M3 mit BIOS3.SPR erstellen.


3.6 Assembling and Linking Your BIOS

This section assumes you have developed a BI0S3.ASM or
BNKBI0S3.ASM file appropriate to your specific hardware environment.
Use the Digital Research Relocatable Macro Assembler RMAC™ to
assemble the BIOS. Use the Digital Research Linker LINK-80™ to
create the BIOS3.SPR and BNKBIOS3.SPR files. The SPR files are part
of the input to the GENCPM program.

In a banked environment, your CP/M 3 BIOS can consist of two
segments: a banked segment and a common segment. This allows you
to minimize common memory usage to maximize the size of the TPA. To
prepare a banked BIOS, place code and data that must reside in
common in the CSEG segment, and code and data that can reside in the
system bank in the DSEG segment. When you link the BIOS, LINK-80
creates the BNKBIOS3.SPR file with all the CSEG code and data first,
and then the DSEG code and data.

After assembling the BIOS with RMAC, link your BNKBIOS using
LINK-80 with the option. The option aligns the DSEG on a
page boundary, and places the length of the CSEG into the
BNKBIOS3.SPR header page.

Use the following procedure to prepare a BIOS3.SPR or
BNKBIOS3.SPR file from your customized BIOS.

1) Assemble your BI0S3.ASM or BNKBI0S3.ASM file with the
relocatable assembler to produce a relocatable
file of type REL. Assemble SCB. ASM to produce the
relocatable file SCB.REL.

RMAC.COM

Assembling the Nonbanked BIOS:

A>RMAC BI0S3

Assembling the Banked BIOS:

A>RMAC BNKBIOS3

2) Link the BI0S3.REL or BNKBI0S3.REL file and the SCB.REL file
with LINK-80 to produce the BI0S3.SPR or BNKBI0S3.SPR file.
The [OS] option with LINK causes the output of a System
Page Relocatable (SPR) file.

Linking the Nonbanked BIOS:

A>LINK BIOS3[OS]=BIOS3,SCB

Linking the Banked BIOS:

A>LINK BNKBIOS3=BNKBIOS3,SCB
mit freundlichen Grüßen

Fritz

SolderGirl
Beiträge: 8
Registriert: 20. Mai 2024, 17:56

Re: CP/M 3 System Generation

Beitrag von SolderGirl » 15. Jun 2024, 19:17

Danke für den Hinweis.
Mein Plan war eigentlich ein banked CPM3 zu erstellen, bei dem aber der gesamte BIOS code im Common RAM sitzt und banked RAM nur von BDOS verwendet wird.

Das hat sich aber als unnötig herausgestellt.
Eine gründliche Untersuchung hat ergeben, dass das Problem im Zusammenspiel meiner banking-Schaltung und dem IO-Timing des eZ80 begründet war.
Wenn der standard eZ80 Bus Modus aktiv ist, schaltet der die Chip-Select und Write Signale genau gleichzeitig um, und liest zeitgleich den nächsten Befehl aus dem RAM. Die Verzögerung durch die banking-Logik hat dazu geführt, dass die Bank Register falsch geladen wurden und somit die Memory Map zerstört war.

Ich habe das behoben indem ich für den entsprechenden Chip Select den sog. "Intel Bus Mode" eingestellt habe. In diesem Modus wird das Write Signal einen Takt früher deaktiviert als das Chip Select Signal, und jetzt funktioniert es fehlerfrei.

genie3s
Beiträge: 100
Registriert: 1. Sep 2019, 16:49

Re: CP/M 3 System Generation

Beitrag von genie3s » 16. Jun 2024, 07:20

Sehr schön erklärt.
mit freundlichen Grüßen

Fritz

Antworten