Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jedeoric committed Feb 10, 2024
1 parent 817b8ab commit 6161061
Show file tree
Hide file tree
Showing 30 changed files with 155 additions and 21 deletions.
2 changes: 2 additions & 0 deletions docs/ADDRESS_READ_BETWEEN_BANK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ADDRESS_READ_BETWEEN_BANK
* XWSTR0
4 changes: 4 additions & 0 deletions docs/ADIODB_VECTOR.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# ADIODB_VECTOR
* XWR0
* XWR0
* XRD0
* XRD0
3 changes: 3 additions & 0 deletions docs/ADSCR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ADSCR
* XWR0
* XWR0
3 changes: 3 additions & 0 deletions docs/ADSCRH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ADSCRH
* XWR0
* XWR0
3 changes: 3 additions & 0 deletions docs/ADSCRL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ADSCRL
* XWR0
* XWR0
3 changes: 3 additions & 0 deletions docs/CURSCR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# CURSCR
* XWR0
* XWR0
3 changes: 3 additions & 0 deletions docs/FLGCUR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# FLGCUR
* XWR0
* XWR0
3 changes: 3 additions & 0 deletions docs/FLGCUR_STATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# FLGCUR_STATE
* XWR0
* XWR0
3 changes: 3 additions & 0 deletions docs/KBDKEY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# KBDKEY
* XRD0
* XRD0
3 changes: 3 additions & 0 deletions docs/KBDSHT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# KBDSHT
* XRD0
* XRD0
3 changes: 3 additions & 0 deletions docs/KEYBOARD_COUNTER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# KEYBOARD_COUNTER
* XRD0
* XRD0
1 change: 1 addition & 0 deletions docs/ORIX_VECTOR_READ_VALUE_INTO_RAM_OVERLAY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# ORIX_VECTOR_READ_VALUE_INTO_RAM_OVERLAY
2 changes: 2 additions & 0 deletions docs/RES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* kernel_create_process
* kernel_kill_process
* kernel_kill_process via XFREE_ROUTINE
* XDECAY
* XADRESS
* XDIVIS
* XREADBYTES_ROUTINE
* XPUTCWD_ROUTINE
Expand Down
1 change: 1 addition & 0 deletions docs/RESB.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* checking_fp_exists
* kernel_create_process
* ZADCHA
* XDECAY
* XDIVIS
* XCLOSE_ROUTINE
* XGETCWD_ROUTINE
Expand Down
3 changes: 3 additions & 0 deletions docs/SCRNB.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SCRNB
* XWR0
* XWR0
2 changes: 2 additions & 0 deletions docs/i_o_counter.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# i_o_counter
* XWR0
* XWR0
* XRD0
* XRD0
1 change: 1 addition & 0 deletions docs/i_o_save.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# i_o_save
* XWR0
* XWSTR0
* XWR0
9 changes: 5 additions & 4 deletions docs/memmap_ram.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
|Type | Name | Range | Size |
| :------- |:----------------------------- |:----------- |:-----|
|RAM|page4 overlay_access | $0419-$0436 | 54 |
|RAM|page4 ORIX_VECTOR_READ_VALUE_INTO_RAM_OVERLAY | $0411-$0411 | 3 |
## Page 5&6
|Type | Name | Range | Size |
| :------- |:----------------------------- |:----------- |:-----|
Expand All @@ -146,12 +147,12 @@
## Kernel bank 7
| Type | Name | Range | Size |
| :-------- |:---------------------------- |:------- |:-----|
|ROM|<span style="color:green">FREE</span> |$fef5-$fff0| 251 |
##Bank 0
|ROM|<span style="color:green">FREE</span> |$feee-$fff0| 258 |
## Bank 0
| Type | Name | Range | Size |
| -------- | ---------------------------- | ------- |-----|
|BANK0|BUFBUF | $c080-$c0b6 | 54 |
|BANK0|BUFROU | $c500-$c54e | |
|BANK0|TELEMON_KEYBOARD_BUFFER_BEGIN | $c5c4-$c680 | |
|BANK0|XMALLOC (copy from kernel) | $fba7-$fc53 | |
|BANK0|X<span style="color:green">FREE</span> (copy from kernel) | $fc53-$fed8 | |
|BANK0|XMALLOC (copy from kernel) | $fba0-$fc4c | |
|BANK0|X<span style="color:green">FREE</span> (copy from kernel) | $fc4c-$fed1 | |
2 changes: 2 additions & 0 deletions docs/work_channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
* XWR0
* XWSTR0
* XRD0
* XRD0
* XOP0
2 changes: 1 addition & 1 deletion generate_memmap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sed -i 's/FREE/<span style="color:green">FREE<\/span>/g' docs/memmap_ram.md
sed -i 's/|#/#/g' docs/memmap_ram.md
sed -i 's/MEMMAP://g' docs/memmap_ram.md

LIST="RESB RES RESC RESD RESE RESF RESG RESH TR0 TR1 TR2 TR3 TR4 TR5 TR6 TR7 work_channel i_o_save i_o_counter ADIODB_VECTOR"
LIST="RESB RES RESC RESD RESE RESF RESG RESH TR0 TR1 TR2 TR3 TR4 TR5 TR6 TR7 work_channel i_o_save i_o_counter ADIODB_VECTOR KEYBOARD_COUNTER KBDKEY KBDSHT SCRNB ADSCR FLGCUR FLGCUR_STATE CURSCR ADSCRL ADSCRH ADDRESS_READ_BETWEEN_BANK ORIX_VECTOR_READ_VALUE_INTO_RAM_OVERLAY"

for I in $LIST; do

Expand Down
47 changes: 43 additions & 4 deletions memmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,50 @@ int MALLOC_FREE_END_HIGH=0x534;
int MALLOC_FREE_END_LOW=0x52f;
int KERNEL_MALLOC_FREE_CHUNK_MAX=0x5;
|CALL:XCRLF:XWR0
|CALL:XWR0:XCOSCR
|MODIFY:work_channel:XWR0
|MODIFY:i_o_save:XWR0
|MODIFY:i_o_counter:XWR0
|MODIFY:ADIODB_VECTOR:XWR0
|MODIFY:SCRNB:XWR0
|MODIFY:ADSCR:XWR0
|MODIFY:FLGCUR:XWR0
|MODIFY:FLGCUR_STATE:XWR0
|MODIFY:CURSCR:XWR0
|MODIFY:ADSCRL:XWR0
|MODIFY:ADSCRH:XWR0
|MODIFY:FLGSCR:XWR0
|MODIFY:i_o_save:XWSTR0
|MODIFY:work_channel:XWSTR0
|MODIFY:ADDRESS_READ_BETWEEN_BANK:XWSTR0
|MODIFY:i_o_save:XWR0
|MODIFY:i_o_counter:XWR0
|MODIFY:ADIODB_VECTOR:XWR0
|MODIFY:SCRNB:XWR0
|MODIFY:ADSCR:XWR0
|MODIFY:FLGCUR:XWR0
|MODIFY:FLGCUR_STATE:XWR0
|MODIFY:CURSCR:XWR0
|MODIFY:ADSCRL:XWR0
|MODIFY:ADSCRH:XWR0
|MODIFY:FLGSCR:XWR0
|MODIFY:work_channel:XRD0
|MODIFY:i_o_counter:XRD0
|MODIFY:ADDRESS_VECTOR_FOR_ADIOB:XRD0
|MODIFY:ADIODB_VECTOR:XRD0
|MODIFY:KEYBOARD_COUNTER:XRD0
|MODIFY:KBDKEY:XRD0
|MODIFY:KBDSHT:XRD0
|MODIFY:$1B:XRDW0
|MODIFY:work_channel:XRD0
|MODIFY:i_o_counter:XRD0
|MODIFY:ADDRESS_VECTOR_FOR_ADIOB:XRD0
|MODIFY:ADIODB_VECTOR:XRD0
|MODIFY:KEYBOARD_COUNTER:XRD0
|MODIFY:KBDKEY:XRD0
|MODIFY:KBDSHT:XRD0
|MODIFY:IOTAB:XOP0
|MODIFY:work_channel:XOP0
|MODIFY:RES:_create_file_pointer
|MODIFY:KERNEL_ERRNO:_create_file_pointer
|CALL:XMALLOC:_create_file_pointer
Expand All @@ -65,6 +100,8 @@ int KERNEL_MALLOC_FREE_CHUNK_MAX=0x5;
|MODIFY:TR5:kernel_kill_process via XFREE_ROUTINE
|MODIFY:RES:kernel_kill_process via XFREE_ROUTINE
|MODIFY:RESB:ZADCHA
|MODIFY:RES:XDECAY
|MODIFY:RESB:XDECAY
|MODIFY:TR0:XBINDX
|MODIFY:TR1:XBINDX
|MODIFY:TR2:XBINDX
Expand All @@ -76,6 +113,7 @@ int KERNEL_MALLOC_FREE_CHUNK_MAX=0x5;
|MODIFY:TR4:XDECIM
|MODIFY:TR5:XDECIM
|MODIFY:TR6:XDECIM
|MODIFY:RES:XADRESS
|MODIFY:TR0:XDIVIS
|MODIFY:TR1:XDIVIS
|MODIFY:RES:XDIVIS
Expand Down Expand Up @@ -321,6 +359,7 @@ CALL:XOPEN:XRM_ROUTINE
|MEMMAP:Type | Name | Range | Size |
|MEMMAP: :------- |:----------------------------- |:----------- |:-----|
|MEMMAP:RAM|page4 overlay_access | $0419-$0436 | 54 |
|MEMMAP:RAM|page4 ORIX_VECTOR_READ_VALUE_INTO_RAM_OVERLAY | $0411-$0411 | 3 |
|##MEMMAP: Page 5&6
|MEMMAP:Type | Name | Range | Size |
|MEMMAP: :------- |:----------------------------- |:----------- |:-----|
Expand All @@ -332,12 +371,12 @@ CALL:XOPEN:XRM_ROUTINE
|##MEMMAP: Kernel bank 7
|MEMMAP: Type | Name | Range | Size |
|MEMMAP: :-------- |:---------------------------- |:------- |:-----|
|MEMMAP:ROM|FREE |$fef5-$fff0| 251 |
|##MEMMAP:Bank 0
|MEMMAP:ROM|FREE |$feee-$fff0| 258 |
|##MEMMAP: Bank 0
|MEMMAP: Type | Name | Range | Size |
|MEMMAP: -------- | ---------------------------- | ------- |-----|
|MEMMAP:BANK0|BUFBUF | $c080-$c0b6 | 54 |
|MEMMAP:BANK0|BUFROU | $c500-$c54e | |
|MEMMAP:BANK0|TELEMON_KEYBOARD_BUFFER_BEGIN | $c5c4-$c680 | |
|MEMMAP:BANK0|XMALLOC (copy from kernel) | $fba7-$fc53 | |
|MEMMAP:BANK0|XFREE (copy from kernel) | $fc53-$fed8 | |
|MEMMAP:BANK0|XMALLOC (copy from kernel) | $fba0-$fc4c | |
|MEMMAP:BANK0|XFREE (copy from kernel) | $fc4c-$fed1 | |
6 changes: 5 additions & 1 deletion src/functions/XOP.asm
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
; A contains channel
XOP0_ROUTINE:
.out .sprintf("|MODIFY:IOTAB:XOP0")
.out .sprintf("|MODIFY:work_channel:XOP0")

ldx #$00 ; Channel 0
pha


@loop:
pla
cmp IOTAB,x ; Already open with the same IO ?
Expand All @@ -15,11 +19,11 @@ XOP0_ROUTINE:
and #$03
bne @loop
pla

@skip2:
rts

skip129:

ldy #(KERNEL_SIZE_IOTAB-1)

@loop:
Expand Down
5 changes: 5 additions & 0 deletions src/functions/XRDW.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ XRD0_ROUTINE:
lda #$00
.out .sprintf("|MODIFY:work_channel:XRD0")
.out .sprintf("|MODIFY:i_o_counter:XRD0")
.out .sprintf("|MODIFY:ADDRESS_VECTOR_FOR_ADIOB:XRD0") ; with send_command_A call
.out .sprintf("|MODIFY:ADIODB_VECTOR:XRD0") ; with send_command_A call
.out .sprintf("|MODIFY:KEYBOARD_COUNTER:XRD0") ; with send_command_A call (manage_I_O_keyboard)
.out .sprintf("|MODIFY:KBDKEY:XRD0") ; with send_command_A call (manage_I_O_keyboard)
.out .sprintf("|MODIFY:KBDSHT:XRD0") ; with send_command_A call (manage_I_O_keyboard)

Lc7da:
sta work_channel ; Save the channel
Expand Down
7 changes: 7 additions & 0 deletions src/functions/XWRD.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
XRDW0_ROUTINE:
.out .sprintf("|MODIFY:$1B:XRDW0")
.out .sprintf("|MODIFY:work_channel:XRD0")
.out .sprintf("|MODIFY:i_o_counter:XRD0")
.out .sprintf("|MODIFY:ADDRESS_VECTOR_FOR_ADIOB:XRD0") ; with send_command_A call
.out .sprintf("|MODIFY:ADIODB_VECTOR:XRD0") ; with send_command_A call
.out .sprintf("|MODIFY:KEYBOARD_COUNTER:XRD0") ; with send_command_A call (manage_I_O_keyboard)
.out .sprintf("|MODIFY:KBDKEY:XRD0") ; with send_command_A call (manage_I_O_keyboard)
.out .sprintf("|MODIFY:KBDSHT:XRD0") ; with send_command_A call (manage_I_O_keyboard)

lda #$00
sta $1B
Expand Down
10 changes: 10 additions & 0 deletions src/functions/XWRx.asm
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
XWR0_ROUTINE:

.out .sprintf("|CALL:XWR0:XCOSCR")
.out .sprintf("|MODIFY:work_channel:XWR0")
.out .sprintf("|MODIFY:i_o_save:XWR0")
.out .sprintf("|MODIFY:i_o_counter:XWR0")
.out .sprintf("|MODIFY:ADIODB_VECTOR:XWR0")
.out .sprintf("|MODIFY:SCRNB:XWR0") ; IOTAB
.out .sprintf("|MODIFY:ADSCR:XWR0") ; IOTAB
.out .sprintf("|MODIFY:FLGCUR:XWR0") ; IOTAB
.out .sprintf("|MODIFY:FLGCUR_STATE:XWR0") ; IOTAB
.out .sprintf("|MODIFY:CURSCR:XWR0") ; IOTAB
.out .sprintf("|MODIFY:ADSCRL:XWR0") ; IOTAB
.out .sprintf("|MODIFY:ADSCRH:XWR0") ; IOTAB
.out .sprintf("|MODIFY:FLGSCR:XWR0") ; IOTAB

pha ; Push byte to write
lda #$00
Expand Down
11 changes: 11 additions & 0 deletions src/functions/XWSTRx.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@
.out .sprintf("|MODIFY:i_o_save:XWSTR0")
.out .sprintf("|MODIFY:work_channel:XWSTR0")
.out .sprintf("|MODIFY:ADDRESS_READ_BETWEEN_BANK:XWSTR0")
.out .sprintf("|MODIFY:i_o_save:XWR0")
.out .sprintf("|MODIFY:i_o_counter:XWR0")
.out .sprintf("|MODIFY:ADIODB_VECTOR:XWR0")
.out .sprintf("|MODIFY:SCRNB:XWR0") ; IOTAB
.out .sprintf("|MODIFY:ADSCR:XWR0") ; IOTAB
.out .sprintf("|MODIFY:FLGCUR:XWR0") ; IOTAB
.out .sprintf("|MODIFY:FLGCUR_STATE:XWR0") ; IOTAB
.out .sprintf("|MODIFY:CURSCR:XWR0") ; IOTAB
.out .sprintf("|MODIFY:ADSCRL:XWR0") ; IOTAB
.out .sprintf("|MODIFY:ADSCRH:XWR0") ; IOTAB
.out .sprintf("|MODIFY:FLGSCR:XWR0") ; IOTAB

ldx #$00
stx i_o_save+1
Expand Down
2 changes: 2 additions & 0 deletions src/functions/xadress.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
; RES +AY = RES and AY

.out .sprintf("|MODIFY:RES:XADRESS")
clc
adc RES
sta RES
Expand Down
3 changes: 3 additions & 0 deletions src/functions/xdecay.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

.proc XDECAY_ROUTINE

.out .sprintf("|MODIFY:RES:XDECAY")
.out .sprintf("|MODIFY:RESB:XDECAY")

sta RES ; on sauve l'adresse du nombre
sty RES+1 ; dans RES
ldy #$00 ; et on met RESB ? 0
Expand Down
Loading

0 comments on commit 6161061

Please sign in to comment.