From 49d8a346adb926b32e7f7ede9b715e1e965e1bf0 Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Tue, 3 Mar 2020 16:40:11 +0100 Subject: [PATCH] fx@3.10: add some T6K11 Also remove an out-of-bounds function. --- asm/fx@3.10-%247.txt | 127 +------------------------------------ asm/fx@3.10/t6k11.txt | 52 +++++++++++++++ symbols/fx@3.10/t6k11.txt | 6 ++ symbols/syscalls-simlo.txt | 2 +- 4 files changed, 61 insertions(+), 126 deletions(-) create mode 100644 asm/fx@3.10/t6k11.txt create mode 100644 symbols/fx@3.10/t6k11.txt diff --git a/asm/fx@3.10-%247.txt b/asm/fx@3.10-%247.txt index 42d1d42..b254fc7 100644 --- a/asm/fx@3.10-%247.txt +++ b/asm/fx@3.10-%247.txt @@ -8,9 +8,9 @@ Discovered RAM memory: This group of variables is related to an obscure long-jump-based scheme that manages global state for GetKeyWait. Check "GetKeyWait_Dispatcher.txt" for more details. - 0x8801b62c "setjmp_buffers" (jmp_buf[2]) + 0x8801b62c: setjmp_buffers (jmp_buf[2]) A datable with two jump buffers of 80 bytes each. - 0x8801b6cc "setjmp_buffer_index" (u8) + 0x8801b6cc: setjmp_buffer_index (u8) Index into the jump buffer table at 0x8801b62c. 0x8801b6cd (u8) Controls the setup of a setjmp() at the start of GetKeyWait_Main. @@ -32,8 +32,6 @@ Call graph: %aca setjmp (DONE - Lephe) <80089d8a> GetKeyWait_Dispatcher (STALLED - Lephe) <80055d48> Keyboard_Initialize (DONE - Lephe) - <80057982> ? - <800578ba> %420 OS_inner_Sleep <8005a60a> ? (and return 1) <8005a60a> ? @@ -587,124 +585,3 @@ Call graph: 80056c36: 69f6 mov.l @r15+, r9 80056c38: 000b rts 80056c3a: 68f6 mov.l @r15+, r8 - ---- - -<80057982> - - 80057982: 4f22 sts.l pr, @-r15 - 80057984: 4f12 sts.l macl, @-r15 - 80057986: 4f02 sts.l mach, @-r15 - 80057988: d636 mov.l 0x800854c2, r6 - 8005798a: 460b jsr @r6 - 8005798c: 0009 nop - 8005798e: 8801 cmp/eq #1, r0 - 80057990: 8b3b bf <80057a0a> - - # RTC_TimeCategorySinceReset() - 80057992: bf92 bsr <800578ba> - 80057994: 0009 nop - 80057996: 2008 tst r0, r0 - 80057998: 8901 bt <8005799e> - 8005799a: 8801 cmp/eq #1, r0 - 8005799c: 8b0d bf <800579ba> - - # If it returns 0 or 1... - 8005799e: d12f mov.l %03b RTC_GetTicks, r1 - 800579a0: 410b jsr @r1 - 800579a2: 0009 nop - 800579a4: 4011 cmp/pz r0 - 800579a6: 8d01 bt.s <800579ac> - 800579a8: 6203 mov r0, r2 - 800579aa: 723f add #63, r2 - 800579ac: e6fa mov #-6, r6 - 800579ae: 426c shad r6, r2 - 800579b0: 6023 mov r2, r0 - 800579b2: c801 tst #1, r0 - 800579b4: 891f bt <800579f6> - 800579b6: a022 bra <800579fe> - 800579b8: 0009 nop - - # If it returns something else... - 800579ba: 8802 cmp/eq #2, r0 - 800579bc: 8901 bt <800579c2> - 800579be: 8803 cmp/eq #3, r0 - 800579c0: 8b5c bf <80057a7c> - 800579c2: d226 mov.l %03b RTC_GetTicks, r2 - 800579c4: 420b jsr @r2 - 800579c6: 0009 nop - 800579c8: 4011 cmp/pz r0 - 800579ca: 8d01 bt.s <800579d0> - 800579cc: 6503 mov r0, r5 - 800579ce: 753f add #63, r5 - 800579d0: e7fa mov #-6, r7 - 800579d2: d128 mov.l 0x2aaaaaab, r1 - 800579d4: 457c shad r7, r5 - 800579d6: 315d dmuls.l r5, r1 - 800579d8: 060a sts mach, r6 - 800579da: 6063 mov r6, r0 - 800579dc: 4004 rotl r0 - 800579de: c901 and #1, r0 - 800579e0: 360c add r0, r6 - 800579e2: 6463 mov r6, r4 - 800579e4: 4600 shll r6 - 800579e6: 364c add r4, r6 - 800579e8: 4600 shll r6 - 800579ea: 3568 sub r6, r5 - 800579ec: 6053 mov r5, r0 - 800579ee: 8804 cmp/eq #4, r0 - 800579f0: 8905 bt <800579fe> - 800579f2: 8805 cmp/eq #5, r0 - 800579f4: 8903 bt <800579fe> - - 800579f6: b06d bsr <80057ad4> - 800579f8: 0009 nop - 800579fa: a03d bra <80057a78> - 800579fc: 0009 nop - - 800579fe: b06f bsr <80057ae0> - 80057a00: 0009 nop - 80057a02: a039 bra <80057a78> - 80057a04: 0009 nop - - 80057a0a: d616 mov.l 0x800854c2, r6 - 80057a0c: 460b jsr @r6 - 80057a0e: 0009 nop - 80057a10: 8802 cmp/eq #2, r0 - 80057a12: 8b33 bf <80057a7c> - 80057a14: bf51 bsr <800578ba> - 80057a16: 0009 nop - 80057a18: 2008 tst r0, r0 - 80057a1a: 892d bt <80057a78> - 80057a1c: 8801 cmp/eq #1, r0 - 80057a1e: 8903 bt <80057a28> - 80057a20: 8802 cmp/eq #2, r0 - 80057a22: 8901 bt <80057a28> - 80057a24: 8803 cmp/eq #3, r0 - 80057a26: 8b29 bf <80057a7c> - 80057a28: b06c bsr <80057b04> - 80057a2a: 0009 nop - 80057a2c: 2008 tst r0, r0 - 80057a2e: 8b23 bf <80057a78> - 80057a30: b06b bsr <80057b0a> - 80057a32: e401 mov #1, r4 - 80057a34: d50d mov.l 0x8008547c, r5 - 80057a36: 450b jsr @r5 - 80057a38: e400 mov #0, r4 - 80057a3a: d60d mov.l 0x8005a8a0, r6 - 80057a3c: 460b jsr @r6 - 80057a3e: 0009 nop - 80057a40: 2008 tst r0, r0 - 80057a42: 8901 bt <80057a48> - 80057a44: ba2a bsr <80056e9c> - 80057a46: 0009 nop - 80057a48: a019 bra <80057a7e> - 80057a4a: e0ff mov #-1, r0 - 80057a78: a001 bra <80057a7e> - 80057a7a: e001 mov #1, r0 - 80057a7c: 0029 movt r0 - 80057a7e: 4f06 lds.l @r15+, mach - 80057a80: 4f16 lds.l @r15+, macl - 80057a82: 4f26 lds.l @r15+, pr - 80057a84: 000b rts - 80057a86: 0009 nop diff --git a/asm/fx@3.10/t6k11.txt b/asm/fx@3.10/t6k11.txt new file mode 100644 index 0000000..9a58d37 --- /dev/null +++ b/asm/fx@3.10/t6k11.txt @@ -0,0 +1,52 @@ +<8001357c T6K11_Command> + Sends a command to the T6K11 interface. + r4: Register number (u8) + r5: Command argument (u8) + + # Note that -76 << 24 = 0xb4000000. + 8001357c: e1b4 mov #-76, r1 + 8001357e: d6a7 mov.l 0xb4010000 T6K11.DATA, r6 + 80013580: 4118 shll8 r1 + 80013582: 4128 shll16 r1 + 80013584: 2140 mov.b r4, @r1 + 80013586: 000b rts + 80013588: 2650 mov.b r5, @r6 + +... + +<%027 T6K11_WritePage> + Writes a byte of data to a T6K11 page (a byte of its RAM). Due to the + configuration of the T6K11 in OS fx@3.xx, rows and pages of the screen are in + ranges 0..63 and 4..19. + + r4: Byte number on chosen row (in range 0..15) (u32) + r5: Row number (in range 0..63) (u32) + r6: Data (u8) + + Stack> (data) (3 bytes) (page) + + # T6K11_Command(8, row|0x80). Selects specified row. + 800135c8: 4f22 sts.l pr, @-r15 + 800135ca: 7ff8 add #-8, r15 + 800135cc: 6063 mov r6, r0 + 800135ce: 80f7 mov.b r0, @(7,r15) + 800135d0: 6053 mov r5, r0 + 800135d2: 2f42 mov.l r4, @r15 + 800135d4: cb80 or #-128, r0 + 800135d6: e408 mov #8, r4 + 800135d8: bfd0 bsr <8001357c> T6K11_Command + 800135da: 6503 mov r0, r5 + + # T6K11_Command(8, page+4). Selects that page (8 consecutive pixels). + 800135dc: 65f2 mov.l @r15, r5 + 800135de: e408 mov #8, r4 + 800135e0: bfcc bsr <8001357c> T6K11_Command + 800135e2: 7504 add #4, r5 + + # T6K11_Command(10, data). Writes the data to the display driver. + 800135e4: 84f7 mov.b @(7,r15), r0 + 800135e6: e40a mov #10, r4 + 800135e8: 650c extu.b r0, r5 + 800135ea: 7f08 add #8, r15 + 800135ec: afc6 bra <8001357c> T6K11_Command + 800135ee: 4f26 lds.l @r15+, pr diff --git a/symbols/fx@3.10/t6k11.txt b/symbols/fx@3.10/t6k11.txt new file mode 100644 index 0000000..e13ee01 --- /dev/null +++ b/symbols/fx@3.10/t6k11.txt @@ -0,0 +1,6 @@ +name: T6K11 +type: symbols +target: fx@3.10 +--- + +8001357c T6K11_Command diff --git a/symbols/syscalls-simlo.txt b/symbols/syscalls-simlo.txt index a5fe999..15db25d 100644 --- a/symbols/syscalls-simlo.txt +++ b/symbols/syscalls-simlo.txt @@ -22,7 +22,7 @@ name: syscalls-simlo %024 Bdisp_GetDisp_DD %025 DD_Read %026 DD_ReadFromPage -%027 DD_WriteToPage +%027 T6K11_WritePage %028 Bdisp_PutDisp_DD %02a Bdisp_DrawShapeToVRAM %02f Bdisp_DrawShapeToVRAM