From 3d23229a38e7c843289569d12fd0deb7ea5d7a17 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 3 Nov 2023 17:28:41 +0200 Subject: Implement more mmio for text mode --- asm/bootstrap.atk16 | 4 + asm/text_mode.atk16 | 28 ++- charset.txt | 8 + digital/atk16.dig | 97 +++++------ digital/atk16_mem.dig | 8 +- digital/atk16_tpu.dig | 472 ++++++++++++++++++++------------------------------ 6 files changed, 280 insertions(+), 337 deletions(-) diff --git a/asm/bootstrap.atk16 b/asm/bootstrap.atk16 index 47f411e..9d69872 100644 --- a/asm/bootstrap.atk16 +++ b/asm/bootstrap.atk16 @@ -8,6 +8,8 @@ @let vt_term_pp_addr 0x15 ; Terminal peripheral address @let vt_kb_pp_addr 0x16 ; Keyboard peripheral address @let vt_gr_mode_addr 0x17 ; Graphics mode setting address +@let vt_sprite_mem 0x18 ; Sprite memory address +@let vt_text_mem 0x19 ; Text memory buffer address ; memory segments @let stack_segment 0x8000 @@ -34,6 +36,8 @@ terminal_addr ; 0x15 keyboard_addr ; 0x16 gr_mode_addr ; 0x17 + sprite_mem ; 0x18 + text_mem ; 0x19 @label hlt_isr ldi 0x55 RE diff --git a/asm/text_mode.atk16 b/asm/text_mode.atk16 index 8fbdb83..f560c68 100644 --- a/asm/text_mode.atk16 +++ b/asm/text_mode.atk16 @@ -2,11 +2,37 @@ @opt csr_scratch RH @use ext_std:* -; bootstrap code (must be called to setup mandatory data) +; bootstrap code (must be called to set up mandatory data) ; will jump to label main @include bootstrap @label main + ldi vt_text_mem RA + ldr RA RA + ldi 4 RB ; letter D + str RB RA + addi RA 1 RA + ldi 5 RB ; letter E + str RB RA + addi RA 1 RA + ldi 1 RB ; letter A + str RB RA + addi RA 1 RA + ldi 4 RB ; letter D + str RB RA + addi RA 1 RA + ldi 2 RB ; letter B + str RB RA + addi RA 1 RA + ldi 5 RB ; letter E + str RB RA + addi RA 1 RA + ldi 5 RB ; letter E + str RB RA + addi RA 1 RA + ldi 6 RB ; letter F + str RB RA + ; set graphics mode to sprite mode ; set_graphics_mode gr_sprite_mode set_graphics_mode gr_text_mode diff --git a/charset.txt b/charset.txt index 57ea48c..d3336e5 100644 --- a/charset.txt +++ b/charset.txt @@ -6,6 +6,14 @@ + + + + + + + + ██ ████ ██ ██ diff --git a/digital/atk16.dig b/digital/atk16.dig index 37530a8..c028bd7 100644 --- a/digital/atk16.dig +++ b/digital/atk16.dig @@ -1584,48 +1584,6 @@ - - Tunnel - - - rotation - - - - NetName - DBUS - - - - - - Tunnel - - - rotation - - - - NetName - CLK - - - - - - Tunnel - - - rotation - - - - NetName - PCLK - - - - Tunnel @@ -1782,6 +1740,39 @@ + + Break + + + + + Tunnel + + + rotation + + + + NetName + DBUS + + + + + + Tunnel + + + rotation + + + + NetName + PCLK + + + + @@ -1912,10 +1903,6 @@ - - - - @@ -1972,6 +1959,10 @@ + + + + @@ -2317,7 +2308,7 @@ - + @@ -2449,7 +2440,7 @@ - + @@ -2541,7 +2532,7 @@ - + @@ -2574,7 +2565,7 @@ - + @@ -2640,6 +2631,10 @@ + + + + @@ -2714,7 +2709,7 @@ - + diff --git a/digital/atk16_mem.dig b/digital/atk16_mem.dig index c3f000a..ed686e6 100644 --- a/digital/atk16_mem.dig +++ b/digital/atk16_mem.dig @@ -35,9 +35,11 @@ Data - 4014,2a00,6027,13*8000,1a,18,18,18,8000,e000,e001,e002,4855,f000 -,3140,1b48,3148,1b48,4016,2000,2000,4215,2240,3040,1800,3148,1b48 -,3140,1b48,e000,4017,2000,4200,3008,6000,4017,2000,4201,3008,61ff + 4014,2a00,6029,13*8000,1c,1a,1a,1a,8000,e000,e001,e002,e800,f800 +,4855,f000,3140,1b48,3148,1b48,4016,2000,2000,4215,2240,3040,1800 +,3148,1b48,3140,1b48,e000,4017,2000,4200,3008,6000,4019,2000,4204 +,3008,1008,4205,3008,1008,4201,3008,1008,4204,3008,1008,4202,3008 +,1008,4205,3008,1008,4205,3008,1008,4206,3008,4017,2000,4201,3008,61ff diff --git a/digital/atk16_tpu.dig b/digital/atk16_tpu.dig index 9f006b3..5126eea 100644 --- a/digital/atk16_tpu.dig +++ b/digital/atk16_tpu.dig @@ -124,54 +124,6 @@ - - In - - - Description - Pixel clock - - - Label - PCLK - - - - - - Tunnel - - - NetName - PCLK - - - - - - In - - - Description - CPU clock - - - Label - CLK - - - - - - Tunnel - - - NetName - CLK - - - - In @@ -360,109 +312,6 @@ - - Counter - - - Bits - 3 - - - - - - Tunnel - - - rotation - - - - NetName - PCLK - - - - - - VDD - - - rotation - - - - - - - Counter - - - Bits - 6 - - - - - - Tunnel - - - NetName - CX - - - - - - VDD - - - rotation - - - - - - - Ground - - - rotation - - - - - - - Tunnel - - - NetName - TX - - - - - - Not - - - - - Tunnel - - - rotation - - - - NetName - COVF - - - - Probe @@ -490,9 +339,9 @@ Data - c,1e,33,33,3f,33,33,0,3f,66,66,3e,66,66,3f,0,3c,66,3,3,3,66,3c -,0,1f,36,66,66,66,36,1f,0,7f,46,16,1e,16,46,7f,0,7f,46,16,1e,16 -,6,f,0,3c,66,3,3,73,66,7c,0,33,33,33,3f,33,33,33,0,1e,5*c,1e + 8*0,c,1e,33,33,3f,33,33,0,3f,66,66,3e,66,66,3f,0,3c,66,3,3,3,66 +,3c,0,1f,36,66,66,66,36,1f,0,7f,46,16,1e,16,46,7f,0,7f,46,16,1e +,16,6,f,0,3c,66,3,3,73,66,7c,0,33,33,33,3f,33,33,33,0,1e,5*c,1e intFormat @@ -526,7 +375,7 @@ rotation - + @@ -623,26 +472,6 @@ - - Tunnel - - - NetName - COVF - - - - - - Ground - - - rotation - - - - - Multiplexer @@ -653,20 +482,6 @@ - - Splitter - - - Input Splitting - 5,6 - - - Output Splitting - 11 - - - - Tunnel @@ -681,20 +496,6 @@ - - Tunnel - - - rotation - - - - NetName - TX - - - - And @@ -833,6 +634,145 @@ + + Counter + + + Label + CLK divider /4 + + + + + + VDD + + + rotation + + + + + + + Ground + + + + + In + + + Description + Pixel clock + + + Label + PCLK + + + + + + Tunnel + + + NetName + CLK + + + + + + Tunnel + + + rotation + + + + NetName + X + + + + + + Splitter + + + Input Splitting + 9 + + + Output Splitting + 3,6 + + + + + + Tunnel + + + NetName + TX + + + + + + Tunnel + + + NetName + CX + + + + + + Tunnel + + + rotation + + + + NetName + CLK + + + + + + Tunnel + + + rotation + + + + NetName + TX + + + + + + Splitter + + + Input Splitting + 6,5 + + + Output Splitting + 11 + + + + @@ -847,10 +787,6 @@ - - - - @@ -868,25 +804,25 @@ - - - - - - + + - - + + + + + + @@ -895,14 +831,6 @@ - - - - - - - - @@ -919,22 +847,10 @@ - - - - - - - - - - - - @@ -956,24 +872,20 @@ - - - - - - + + - - + + - - + + @@ -992,12 +904,12 @@ - - + + - - + + @@ -1019,10 +931,6 @@ - - - - @@ -1036,20 +944,12 @@ - - - - - - - - - + - - + + @@ -1059,6 +959,14 @@ + + + + + + + + @@ -1068,12 +976,16 @@ - - + + - - + + + + + + @@ -1107,10 +1019,6 @@ - - - - @@ -1127,10 +1035,6 @@ - - - - @@ -1152,8 +1056,8 @@ - - + + @@ -1164,12 +1068,16 @@ - - + + + + + + - - + + -- cgit v1.3