fx@3.10: more T6K11 syscalls

This commit is contained in:
Lephenixnoir 2020-03-03 16:58:45 +01:00
parent 49d8a346ad
commit 782b7849d8
3 changed files with 113 additions and 8 deletions

View File

@ -12,7 +12,53 @@
80013586: 000b rts
80013588: 2650 mov.b r5, @r6
...
<%025 T6K11_ReadCurrentPage>
Reads the current value from register 10 (graphics RAM).
8001358a: e1b4 mov #-76, r1
8001358c: d4a3 mov.l 0xb4010000 T6K11.DATA, r4
8001358e: 4118 shll8 r1
80013590: e60a mov #10, r6
80013592: 4128 shll16 r1
80013594: 2160 mov.b r6, @r1
80013596: 000b rts
80013598: 6040 mov.b @r4, r0
<%026 T6K11_ReadPage>
r4: Byte number on chosen row (in range 0..15) (u32)
r5: Row number (in range 0..63)
r0: Returns this page's data.
Stack> || (page)
# T6K11_Command(8, row|0x80). Selects specified row.
8001359a: 4f22 sts.l pr, @-r15
8001359c: 7ffc add #-4, r15
8001359e: 6053 mov r5, r0
800135a0: 2f42 mov.l r4, @r15
800135a2: cb80 or #-128, r0
800135a4: e408 mov #8, r4
800135a6: bfe9 bsr 8001357c T6K11_Command
800135a8: 6503 mov r0, r5
# T6K11_Command(8, page+4). Selects that page.
800135aa: 65f2 mov.l @r15, r5
800135ac: e408 mov #8, r4
800135ae: bfe5 bsr 8001357c T6K11_Command
800135b0: 7504 add #4, r5
# Read directly from register 10 and return that value.
800135b2: e2b4 mov #-76, r2
800135b4: d799 mov.l 0xb4010000 T6K11.DATA, r7
800135b6: 4218 shll8 r2
800135b8: e10a mov #10, r1
800135ba: 4228 shll16 r2
800135bc: 2210 mov.b r1, @r2
800135be: 6070 mov.b @r7, r0
800135c0: 7f04 add #4, r15
800135c2: 4f26 lds.l @r15+, pr
800135c4: 000b rts
800135c6: 0009 nop
<%027 T6K11_WritePage>
Writes a byte of data to a T6K11 page (a byte of its RAM). Due to the
@ -23,7 +69,7 @@
r5: Row number (in range 0..63) (u32)
r6: Data (u8)
Stack> (data) (3 bytes) (page)
Stack> || (data) (3 bytes) (page)
# T6K11_Command(8, row|0x80). Selects specified row.
800135c8: 4f22 sts.l pr, @-r15
@ -34,13 +80,13 @@
800135d2: 2f42 mov.l r4, @r15
800135d4: cb80 or #-128, r0
800135d6: e408 mov #8, r4
800135d8: bfd0 bsr <8001357c> T6K11_Command
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
800135e0: bfcc bsr 8001357c T6K11_Command
800135e2: 7504 add #4, r5
# T6K11_Command(10, data). Writes the data to the display driver.
@ -50,3 +96,63 @@
800135ea: 7f08 add #8, r15
800135ec: afc6 bra <8001357c> T6K11_Command
800135ee: 4f26 lds.l @r15+, pr
<%01b T6K11_Clear>
Clears the T6K11 graphics RAM. This function actually clears 64 rows of 24
pages each, which reprsents an area of size 192x64. This is probably the exact
size of the RAM, though there could be more rows.
# r12 is the row counter, r13 the page counter.
800135f0: 2f86 mov.l r8, @-r15
800135f2: 2f96 mov.l r9, @-r15
800135f4: 2fa6 mov.l r10, @-r15
800135f6: 2fb6 mov.l r11, @-r15
800135f8: 2fc6 mov.l r12, @-r15
800135fa: 2fd6 mov.l r13, @-r15
800135fc: 2fe6 mov.l r14, @-r15
800135fe: 4f22 sts.l pr, @-r15
80013600: ec00 mov #0, r12
80013602: eb08 mov #8, r11
80013604: ea0a mov #10, r10
80013606: e840 mov #64, r8
80013608: 69c3 mov r12, r9
# Outer loop, executed for 64 rows. Select row r12.
8001360a: 60c3 mov r12, r0
8001360c: 64b3 mov r11, r4
8001360e: cb80 or #-128, r0
80013610: bfb4 bsr <8001357c> T6K11_Command
80013612: 6503 mov r0, r5
80013614: ee18 mov #24, r14
80013616: ed00 mov #0, r13
# Inner loop, executed for 24 pages per row. Select page r13 and write zeros
# to the data register. This clears up to page 23, which might be the limit on
# the Graph 35+E II's modified T6K11 (this would mean the graphics RAM of the
# controller has 192 columns). This somewhat makes senses because it makes the
# 4..19 page range of the display centered in the graphics RAM.
80013618: 64b3 mov r11, r4
8001361a: 65d3 mov r13, r5
8001361c: bfae bsr <8001357c> T6K11_Command
8001361e: 7d01 add #1, r13
80013620: 6593 mov r9, r5
80013622: bfab bsr <8001357c> T6K11_Command
80013624: 64a3 mov r10, r4
80013626: 4e10 dt r14
80013628: 8bf6 bf <80013618>
# Next row.
8001362a: 7c01 add #1, r12
8001362c: 3c87 cmp/gt r8, r12
8001362e: 8bec bf <8001360a>
# Restore stack and leave.
80013630: 4f26 lds.l @r15+, pr
80013632: 6ef6 mov.l @r15+, r14
80013634: 6df6 mov.l @r15+, r13
80013636: 6cf6 mov.l @r15+, r12
80013638: 6bf6 mov.l @r15+, r11
8001363a: 6af6 mov.l @r15+, r10
8001363c: 69f6 mov.l @r15+, r9
8001363e: 000b rts
80013640: 68f6 mov.l @r15+, r8

View File

@ -4,7 +4,6 @@ name: syscalls-lephe
%000 sys_init
%004 tlb_init
%025 t6k11_read_datareg
%3fc tlb_map
%ac9 longjmp

View File

@ -13,15 +13,15 @@ name: syscalls-simlo
%014 GlibGetAddinLibInfo
%015 GlibGetOSVersionInfo
%018 MMU_FlushCache
%01b DD_Clear
%01b T6K11_Clear
%01c Bdisp_WriteGraph_VRAM
%01d Bdisp_WriteGraph_DD
%01e Bdisp_WriteGraph_DDVRAM
%022 Bdisp_ReadArea_VRAM
%023 Bdisp_ReadArea_DD
%024 Bdisp_GetDisp_DD
%025 DD_Read
%026 DD_ReadFromPage
%025 T6K11_ReadCurrentPage
%026 T6K11_ReadPage
%027 T6K11_WritePage
%028 Bdisp_PutDisp_DD
%02a Bdisp_DrawShapeToVRAM