Browse Source

Merge pull request #305 from b1ackmai1er/dev

Notes about flash file system
pull/331/head
Wayne Warthen 3 years ago
committed by GitHub
parent
commit
54ce18bb75
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 161
      Source/Doc/Architecture.md
  2. 10
      Source/Doc/GettingStarted.md
  3. 6
      Source/HBIOS/hbios.asm

161
Source/Doc/Architecture.md

@ -30,6 +30,8 @@ RomWBW firmware includes:
* HBIOS (Hardware BIOS) providing support for the vast majority of
RetroBrew Computers I/O components
* Diagnostics and customizable debugging information.
* A complete operating system (either CP/M 2.2 or ZSDOS 1.1)
* A built-in CP/M filesystem containing the basic applications and
@ -2198,6 +2200,163 @@ be inserted in the table at the index. On return, HL will contain the
previous address in the table at the index.
`\clearpage`{=latex}
Errors and diagnostics
========
ROMWBW tries to provide useful information when a run time or build time
error occurs. Many sections of the code also have code blocks that can be
enable to aid in debugging and in some cases the level of reporting detail
can be customized.
Run time errors
--------
### PANIC
A panic error indicates a non-recoverable error. The processor status is displayed on the console
and interrupts are disabled and execution is halted. A cold boot or reset is required to restart.
Example error message:
\>>> PANIC: @06C4[DFA3:DFC3:0100:F103:04FC:0000:2B5E]
\*** System Halted ***
The format of the information provided is
@XXXX [-AF-:-BC-:-DE-:-HL-:-SP-:-IX-:-IY-]
Where @XXXX is the address the panic was called from. The other information
is the CPU register contents.
Possible reasons a PANIC may occur are:
- RAM Bank range error when attempting a read or write to a RAM disk.
- Sector read function has not been setup but a read was attempted.
- There was an attempt to add more devices than the device table had room for.
- An illegal SD card command was encountered.
The @XXXX memory address can be cross referenced with the build source code to identify
which section of the software or hardware caused the fault.
### SYSCHK
A syschk error is reported when an internal error is detected. The key differance
to the PANIC error is that execution may be continued. In which case an error
code is returned to the calling routine. The error code is not displayed at the console.
Example error message:
\>>> SYSCHK: @06C4[DFA3:DFC3:0100:F103:04FC:0000:2B5E] Continue (Y/N)
The format of the information provided is the same as with the PANIC report.
@XXXX [-AF-:-BC-:-DE-:-HL-:-SP-:-IX-:-IY-]
Syschk error codes are returned in the A register.
| Error | Code |
| ----------------------------------- | -------- |
| Success | 0x00 |
| Undefined Error | 0xFF |
| Function Not Implemented | 0xFE |
| Invalid Function | 0xFD |
| Invalid Unit Number | 0xFC |
| Out Of Memory | 0xFB |
| Parameter Out Of Range | 0xFA |
| Media Not Present | 0xF9 |
| Hardware Not Present | 0xF8 |
| I/O Error | 0xF7 |
| Write Request To Read-Only Media | 0xF6 |
| Device Timeout | 0xF5 |
| Invalid Configuration | 0xF4 |
| Internal Error | 0xF3 |
### Error Level reporting
placeholder
Build time errors
--------
### Build chain tool errors
place holder
### Assembly time check errors
placeholder
Diagnostics
--------
### DIAG
Progress through the boot and initialization process can be difficult to monitor
due to the lack of console or video output. Access to these output devices does
not become available until late the in the boot process. If these output devices
are also involved with the issue trying to be resolved then trouble shooting is
even more difficult.
ROMWBW can be configured to display boot progress with the assistance of additional
hardware. This take the form of an LED breakout debugging board connected to an
8-bit output port. As the boot code executes, the LED output display is updated.
To us an LED breakout board, it must be connected the computers data, reset and port
select lines.
To enable the DIAG option the following settings must be made in the systems .ini
configuration file, where 0xnn is the port address.
DIAGENABLE .SET TRUE
DIAGPORT .SET 0xnn
The following table shows the ROMWBW process steps in relation to the LED display.
| LED | ROMWBW Processes |
| -------- |:---------------------------------------------- |
| `........` | Initial boot |
| | Jump to start address |
| | Disable interrupts |
| | Set interrupt mode 1 |
| | Initialize critical ports and initial speed |
| `.......O` | Setup initial stack |
| | Memory manager and CPU configuration |
| | Set top bank to be RAM |
| `......OO` | Get and save battery condition |
| | Install HBIOS proxy in upper memory |
| | If platform is MBC reconfigure memory manager |
| | Setup "ROMLESS" HBIOS image or ... |
| | Copy HBIOS from ROM to RAM if RAM flag not set |
| | Jump to HBIOS in RAM |
| | Set running in RAM flag |
| `.....OOO` | Finalize configuration for running in RAM |
| | Check battery condition |
| | Check for recovery mode boot |
| `....OOOO` | Identify CPU type |
| `...OOOOO` | Set cpu oscillator speed |
| | Setup counter-timers |
| | Setup heap |
| `..OOOOOO` | Preconsole initialization |
| `.OOOOOOO` | Boot delay |
| | Set boot console device |
| | Bios announcement |
| `OOOOOOOO` | Display platform information |
| | Display memory configuration |
| | Display CPU family |
| | Verify ROM checksum |
| | Report battery condition |
| | Perform device driver initialization |
| | Report watchdog status |
| | Mark HBIOS heap so it is preserved |
| | Switch from boot console to CRT if active |
| | Display device summary |
| | Execute boot loader |
`\clearpage`{=latex}
### Appendix A Driver Instance Data fields
@ -2229,3 +2388,5 @@ The following section outlines the read only data referenced by the
| DCNTL* | 14 | 1 | Z180 DMA/WAIT CONTROL |
* ONLY PRESENT FOR Z180 BUILDS

10
Source/Doc/GettingStarted.md

@ -463,6 +463,16 @@ will find some files on the ROM disk that will work with ZSDOS, but
will not work on CP/M 2.2. For example, `LDDS`, which loads the
ZSDOS date/time stamper will only run on ZSDOS.
## Flash ROM Disks
The limitation of ROM disks being read only can be overcome on some
platforms with the appropriate selection of Flash ROM chip and
system configuration. In this case the flash-file system can be
enabled which will allow the ROM disk to be read and written to.
Flash devices have a limited write lifespan and continual usage will
eventually wear out the device. It is not suited for high usage
applications.
## Disk Devices
While the RAM/ROM disks provide a functional system, they are not

6
Source/HBIOS/hbios.asm

@ -1334,8 +1334,10 @@ Z280_INITZ:
; NOT WANT TO EFFECT RAM UNTIL AFTER THE BACKUP BATTERY STATUS CHECK
; IS PERFORMED NEXT.
;
#IF (DIAGENABLE)
LD A,%00000011
OUT (DIAGPORT),A
#ENDIF
;
; WE USE THE TWO BYTES IMMEDIATELY BELOW THE PROXY TO STORE A COUPLE
; VALUES TEMPORARILY BECAUSE WE MAY BE OPERATING IN ROM AT THIS POINT.
@ -1354,7 +1356,7 @@ Z280_INITZ:
; WILL NOT START CORRECTLY WHEN THEY CHECK THE ROM ID VERSION BYTES.
; THE BATTERY CONDITION VALUE IS TEMPORARILY STORED AT HBX_LOC - 1
; BECAUSE WE ARE CURRENTLY RUNNING IN ROM. AFTER WE TRANSITION HBIOS
; TO RAM, THE VALUE IS MOVED TO IT'S REAL LCOATION AT HB_BATCOND.
; TO RAM, THE VALUE IS MOVED TO IT'S REAL LOCATION AT HB_BATCOND.
; IF THERE IS NO DS1210 IN THE SYSTEM, THE CODE BELOW DOES NO HARM.
;
LD HL,HBX_LOC - 1 ; POINT TO BYTE
@ -1660,7 +1662,7 @@ HB_START1: ; BNKCALL ARRIVES HERE, BUT NOW RUNNING IN RAM BANK
; THAT.
LD SP,HBX_LOC - 2 ; RESET STACK
;
; NOTIFY THAT WE MADE THE TRANSTION!
; NOTIFY THAT WE MADE THE TRANSITION!
DIAG(%00000111)
LED(%00000010)
;

Loading…
Cancel
Save