Skip to content

Commit

Permalink
Documentation Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wwarthen committed Jan 25, 2024
1 parent a00cf82 commit b633c30
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 20 deletions.
Binary file modified Doc/RomWBW Applications.pdf
Binary file not shown.
Binary file modified Doc/RomWBW Disk Catalog.pdf
Binary file not shown.
Binary file modified Doc/RomWBW Errata.pdf
Binary file not shown.
Binary file modified Doc/RomWBW ROM Applications.pdf
Binary file not shown.
Binary file modified Doc/RomWBW System Guide.pdf
Binary file not shown.
Binary file modified Doc/RomWBW User Guide.pdf
Binary file not shown.
47 changes: 30 additions & 17 deletions Source/Doc/SystemGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -1992,11 +1992,11 @@ If the system is using interrupt mode 1 interrupts, the you **must**
take steps to ensure interrupts are properly handled. You generally
have two choices:

- Disable interrupts while the normal user bank is switched out
- Duplicate the interrupt mode 1 vector from the normal user bank
- Disable interrupts while the User Bank is switched out
- Duplicate the interrupt mode 1 vector from the User Bank
into the bank you are switching to.

If the normal user bank has been switched out, you will not be able to
If the User Bank has been switched out, you will not be able to
invoke the HBIOS API functions using an `RST 08` instruction. You can
use the alternative mechanism using `CALL $FFF0` as described in
[Invocation].
Expand Down Expand Up @@ -2398,7 +2398,8 @@ concept of allocation of application banks must be implemented within
the OS or application.

This function does not change the current bank selected. You must use
[Function 0xF2 -- System Set Bank (SYSSETBNK)] or ???? for this. Be sure
[Function 0xF2 -- System Set Bank (SYSSETBNK)] or the proxy function
[Bank Select (BNKSEL)] for this. Be sure
to observe the warnings in the description of this function.

### Function 0xF9 -- System Set (SYSSET)
Expand Down Expand Up @@ -2629,17 +2630,32 @@ provided.
## Proxy Functions

The following special functions are implemented inside of the HBIOS
proxy area at the top of RAM. They do not cause a bank switch are are,
proxy area at the top of RAM. They do not cause a bank switch and are,
therefore, much faster than their corresponding HBIOS API functions.

The functions are invoked via the following dedicated jump table:

| **Function** | **Address** |
|----------------------------------------|----------------------------------------|
| Invoke HBIOS Function (INVOKE) | 0xFFF0 |
| Bank Select (BNKSEL) | 0xFFF3 |
| Bank Copy (BNKCPY) | 0xFFF6 |
| Bank Call (BNKCALL) | 0xFFF9 |
| **Function** | **Address** | ** Equate ** |
|----------------------------------------|---------------|------------------------|
| Invoke HBIOS Function (INVOKE) | 0xFFF0 | HB_INVOKE |
| Bank Select (BNKSEL) | 0xFFF3 | HB_BNKSEL |
| Bank Copy (BNKCPY) | 0xFFF6 | HB_BNKCPY |
| Bank Call (BNKCALL) | 0xFFF9 | HB_BNKCALL |

The function addresses are also defined as equates in hbios.inc. It
is suggested that you use the equates when possible.

To use the functions, you may either call or jump to them. Some
examples:

```
CALL $FFF0
JP $FFF3
CALL HB_BNKCPY
```

These functions are inherently dangerous and generally not value
checked. Use with extreme caution.

### Invoke HBIOS Function (INVOKE)

Expand All @@ -2651,9 +2667,6 @@ above. To put it another way, `CALL $FFF0` is equivalent to `RST 08`,
but it can be used in any scenario when the normal bank is not
selected.

These functions are inherently dangerous and generally not value
checked. Use with extreme caution.

### Bank Select (BNKSEL)

**Address 0xFFF3**
Expand All @@ -2663,9 +2676,9 @@ checked. Use with extreme caution.
| A: Bank ID | |

This function will select the memory bank identified by Bank ID (A).
All registers are preserved.
Register AF is destroyed. All other registers are preserved.

The warnings described in [Function 0xF3 -- System Get Bank (SYSGETBNK)]
The warnings described in [Function 0xF2 -- System Set Bank (SYSSETBNK)]
should be observed.

### Bank Copy (BNKCPY)
Expand Down Expand Up @@ -2716,7 +2729,7 @@ Register usage is determined by the routine that is called.

Since a different bank will be selected while the target function is
active, the warnings described in
[Function 0xF3 -- System Get Bank (SYSGETBNK)] should be observed.
[Function 0xF2 -- System Set Bank (SYSSETBNK)] should be observed.

`\clearpage`{=latex}

Expand Down
2 changes: 1 addition & 1 deletion Source/HBIOS/hbios.asm
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ HBX_INVSP .EQU $ - 2
;
;;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;; BNKSEL - Switch Memory Bank to Bank in A.
;; Preserve all Registers including Flags.
;; AF is destroyed, all other registers are preserved.
;;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;
HBX_BNKSEL:
Expand Down
2 changes: 1 addition & 1 deletion Source/ver.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#DEFINE RMN 5
#DEFINE RUP 0
#DEFINE RTP 0
#DEFINE BIOSVER "3.5.0-dev.4"
#DEFINE BIOSVER "3.5.0-dev.6"
#define rmj RMJ
#define rmn RMN
#define rup RUP
Expand Down
2 changes: 1 addition & 1 deletion Source/ver.lib
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ rmn equ 5
rup equ 0
rtp equ 0
biosver macro
db "3.5.0-dev.4"
db "3.5.0-dev.6"
endm

0 comments on commit b633c30

Please sign in to comment.