1. Pierre Surply
  2. TI84RPN

Commits

Pierre Surply  committed fd0b30a

LCD: Hello World

  • Participants
  • Parent commits ae0e945
  • Branches master

Comments (0)

Files changed (14)

File .gitignore

View file
  • Ignore whitespace
+*.lst
+*.8xu
+*.rom
+

File Makefile

View file
  • Ignore whitespace
+AS	= sjasm
+AFLAGS  = -i./inc
+TILEM	= tilem2
+ROM	= ti84rpn.rom
+UPG     = ti84rpn.8xu
+HEX	= $(ROM:.rom=.hex)
+
+SRC	= main.asm
+SRC	:= $(addprefix src/, $(SRC))
+
+all:: $(UPG)
+
+$(UPG): $(ROM)
+	mktiupgrade -p -d TI-84+ -k build/0A.key $< $(UPG) 00
+
+emul:: $(ROM)
+	$(TILEM) -m ti84p -r $(ROM)
+
+debug:: $(ROM)
+	$(TILEM) -m ti84p -ldr $(ROM)
+
+$(ROM): $(SRC)
+	$(AS) $(AFLAGS) $^
+
+clean::
+	$(RM) $(ROM) $(BIN)

File build/02.key

View file
  • Ignore whitespace
+4081396D55C0989BC949FA30821FFE61C9441EDC3827D0E89EEE16DDEF697634B8E10B8B7F42FE7CC1A7478606D6D09F6FE96365E71E3D2AAA7C8D91068F1DFAF3
+20E1A6FD4557AB2234E92FACBBADD9E7FA2452B5C238F1EF296AFB2BFE67BACC1E
+21A106BE04DC99B4F389D3B96951224E064F417E34EEF53130E9BEDC9A721EE1EB07

File build/04.key

View file
  • Ignore whitespace
+408FE528B340EB1C88B505B2354BAADF47F3616D92CB532E7E5A2A0DFF1C4E4283CEEA2B2F7AD5F28B7E4BE4F3F4C99CABA0D98A8E5F2BE15E2AAC7CED0940EF82
+20CDFF9610024DB1B7AD46D691E0E538BB00A1D840F5CCAF8EC0FED20C3A9D700B
+21CB4662A9084F5076B117892EBA3FB0DF9EB24988A62A83890B5A0B4E18BD07720B

File build/0A.key

View file
  • Ignore whitespace
+40B11C71D4EA2C13C9AB2E501C6085FEC87FF3B88BFD783EAC43351E1B10F65AD31C79C1268F75051DC8FC008EBF593AE5912E8B653975C13127E2B60A0BEF5FEF
+204DD5B4E544CACBC4EF869CDA30A6908FF7D1BDDB92B1ADE1E1C93CC614904894
+21F5E2DFBCA3D5C86F4815DC69452E4FC7D122D650374E880B62294279F21A439D01

File build/0F.key

View file
  • Ignore whitespace
+40B11C71D4EA2C13C9AB2E501C6085FEC87FF3B88BFD783EAC43351E1B10F65AD31C79C1268F75051DC8FC008EBF593AE5912E8B653975C13127E2B60A0BEF5FEF
+204DD5B4E544CACBC4EF869CDA30A6908FF7D1BDDB92B1ADE1E1C93CC614904894
+21F5E2DFBCA3D5C86F4815DC69452E4FC7D122D650374E880B62294279F21A439D01

File inc/io.inc

View file
  • Ignore whitespace
+PORT_LINK       = 00h
+PORT_KEYBOARD   = 01h
+PORT_STATUS     = 02h
+PORT_INT_MASK   = 03h
+PORT_MMAP       = 04h
+PORT_RAM_PAGE   = 05h
+PORT_MEMA       = 06h
+PORT_MEMB       = 07h
+PORT_LCD_CMD    = 10h
+PORT_LCD_DATA   = 11h

File src/boot.asm

View file
  • Ignore whitespace
+boot:
+    di
+    ld   sp, 0FFFDh
+    ld   a, 0Ch
+    out  (PORT_MMAP), a
+    call lcd_init
+    ld   a, 1
+    ld   b, 2
+    ld   hl, hello
+    call lcd_print_string
+
+loop:
+    jp loop
+
+hello:
+    dz "Hello !"

File src/fake_boot.asm

View file
  • Ignore whitespace
+fake_boot:
+    jp  rst

File src/font.asm

View file
  • Ignore whitespace
+font:           db	0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00	; (.)
+		db	0x7E, 0x81, 0xA5, 0x81, 0xBD, 0x99, 0x81, 0x7E	; (.)
+		db	0x7E, 0xFF, 0xDB, 0xFF, 0xC3, 0xE7, 0xFF, 0x7E	; (.)
+		db	0x6C, 0xFE, 0xFE, 0xFE, 0x7C, 0x38, 0x10, 0x00	; (.)
+		db	0x10, 0x38, 0x7C, 0xFE, 0x7C, 0x38, 0x10, 0x00	; (.)
+		db	0x38, 0x7C, 0x38, 0xFE, 0xFE, 0x7C, 0x38, 0x7C	; (.)
+		db	0x10, 0x10, 0x38, 0x7C, 0xFE, 0x7C, 0x38, 0x7C	; (.)
+		db	0x00, 0x00, 0x18, 0x3C, 0x3C, 0x18, 0x00, 0x00	; (.)
+		db	0xFF, 0xFF, 0xE7, 0xC3, 0xC3, 0xE7, 0xFF, 0xFF	; (.)
+		db	0x00, 0x3C, 0x66, 0x42, 0x42, 0x66, 0x3C, 0x00	; (.)
+		db	0xFF, 0xC3, 0x99, 0xBD, 0xBD, 0x99, 0xC3, 0xFF	; (.)
+		db	0x0F, 0x07, 0x0F, 0x7D, 0xCC, 0xCC, 0xCC, 0x78	; (.)
+		db	0x3C, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x18	; (.)
+		db	0x3F, 0x33, 0x3F, 0x30, 0x30, 0x70, 0xF0, 0xE0	; (.)
+		db	0x7F, 0x63, 0x7F, 0x63, 0x63, 0x67, 0xE6, 0xC0	; (.)
+		db	0x99, 0x5A, 0x3C, 0xE7, 0xE7, 0x3C, 0x5A, 0x99	; (.)
+		db	0x80, 0xE0, 0xF8, 0xFE, 0xF8, 0xE0, 0x80, 0x00	; (.)
+		db	0x02, 0x0E, 0x3E, 0xFE, 0x3E, 0x0E, 0x02, 0x00	; (.)
+		db	0x18, 0x3C, 0x7E, 0x18, 0x18, 0x7E, 0x3C, 0x18	; (.)
+		db	0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x00	; (.)
+		db	0x7F, 0xDB, 0xDB, 0x7B, 0x1B, 0x1B, 0x1B, 0x00	; (.)
+		db	0x3C, 0x66, 0x38, 0x6C, 0x6C, 0x38, 0xCC, 0x78	; (.)
+		db	0x00, 0x00, 0x00, 0x00, 0x7E, 0x7E, 0x7E, 0x00	; (.)
+		db	0x18, 0x3C, 0x7E, 0x18, 0x7E, 0x3C, 0x18, 0xFF	; (.)
+		db	0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x00	; (.)
+		db	0x18, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x00	; (.)
+		db	0x00, 0x18, 0x0C, 0xFE, 0x0C, 0x18, 0x00, 0x00	; (.)
+		db	0x00, 0x30, 0x60, 0xFE, 0x60, 0x30, 0x00, 0x00	; (.)
+		db	0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xFE, 0x00, 0x00	; (.)
+		db	0x00, 0x24, 0x66, 0xFF, 0x66, 0x24, 0x00, 0x00	; (.)
+		db	0x00, 0x18, 0x3C, 0x7E, 0xFF, 0xFF, 0x00, 0x00	; (.)
+		db	0x00, 0xFF, 0xFF, 0x7E, 0x3C, 0x18, 0x00, 0x00	; (.)
+		db	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00	; ( )
+		db	0x30, 0x78, 0x78, 0x30, 0x30, 0x00, 0x30, 0x00	; (!)
+		db	0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00	; (")
+		db	0x6C, 0x6C, 0xFE, 0x6C, 0xFE, 0x6C, 0x6C, 0x00	; (#)
+		db	0x30, 0x7C, 0xC0, 0x78, 0x0C, 0xF8, 0x30, 0x00	; ($)
+		db	0x00, 0xC6, 0xCC, 0x18, 0x30, 0x66, 0xC6, 0x00	; (%)
+		db	0x38, 0x6C, 0x38, 0x76, 0xDC, 0xCC, 0x76, 0x00	; (&)
+		db	0x60, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00	; (')
+		db	0x18, 0x30, 0x60, 0x60, 0x60, 0x30, 0x18, 0x00	; (()
+		db	0x60, 0x30, 0x18, 0x18, 0x18, 0x30, 0x60, 0x00	; ())
+		db	0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00	; (*)
+		db	0x00, 0x30, 0x30, 0xFC, 0x30, 0x30, 0x00, 0x00	; (+)
+		db	0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x60	; (,)
+		db	0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00	; (-)
+		db	0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00	; (.)
+		db	0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0x80, 0x00	; (/)
+		db	0x7C, 0xC6, 0xCE, 0xDE, 0xF6, 0xE6, 0x7C, 0x00	; (0)
+		db	0x30, 0x70, 0x30, 0x30, 0x30, 0x30, 0x30, 0x00	; (1)
+		db	0x78, 0xCC, 0x0C, 0x38, 0x60, 0xC0, 0xFC, 0x00	; (2)
+		db	0x78, 0xCC, 0x0C, 0x38, 0x0C, 0xCC, 0x78, 0x00	; (3)
+		db	0x1C, 0x3C, 0x6C, 0xCC, 0xFE, 0x0C, 0x0C, 0x00	; (4)
+		db	0xFC, 0xC0, 0xF8, 0x0C, 0x0C, 0xCC, 0x78, 0x00	; (5)
+		db	0x38, 0x60, 0xC0, 0xF8, 0xCC, 0xCC, 0x78, 0x00	; (6)
+		db	0xFC, 0x0C, 0x0C, 0x18, 0x30, 0x30, 0x30, 0x00	; (7)
+		db	0x78, 0xCC, 0xCC, 0x78, 0xCC, 0xCC, 0x78, 0x00	; (8)
+		db	0x78, 0xCC, 0xCC, 0x7C, 0x0C, 0x18, 0x70, 0x00	; (9)
+		db	0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00	; (:)
+		db	0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x60	; (;)
+		db	0x18, 0x30, 0x60, 0xC0, 0x60, 0x30, 0x18, 0x00	; (<)
+		db	0x00, 0x00, 0xFC, 0x00, 0x00, 0xFC, 0x00, 0x00	; (=)
+		db	0x60, 0x30, 0x18, 0x0C, 0x18, 0x30, 0x60, 0x00	; (>)
+		db	0x78, 0xCC, 0x0C, 0x18, 0x30, 0x00, 0x30, 0x00	; (?)
+		db	0x7C, 0xC6, 0xDE, 0xDE, 0xDE, 0xC0, 0x78, 0x00	; (@)
+		db	0x18, 0x3C, 0x66, 0x66, 0x7E, 0x66, 0x66, 0x00	; (A)
+		db	0x7C, 0x66, 0x66, 0x7C, 0x66, 0x66, 0x7C, 0x00	; (B)
+		db	0x3C, 0x66, 0xC0, 0xC0, 0xC0, 0x66, 0x3C, 0x00	; (C)
+		db	0x78, 0x6C, 0x66, 0x66, 0x66, 0x6C, 0x78, 0x00	; (D)
+		db	0x7E, 0x60, 0x60, 0x78, 0x60, 0x60, 0x7E, 0x00	; (E)
+		db	0x7E, 0x60, 0x60, 0x78, 0x60, 0x60, 0x60, 0x00	; (F)
+		db	0x3C, 0x66, 0xC0, 0xC0, 0xCE, 0x66, 0x3E, 0x00	; (G)
+		db	0x66, 0x66, 0x66, 0x7E, 0x66, 0x66, 0x66, 0x00	; (H)
+		db	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00	; (I)
+		db	0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3C, 0x00	; (J)
+		db	0x66, 0x66, 0x6C, 0x78, 0x6C, 0x66, 0x66, 0x00	; (K)
+		db	0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7E, 0x00	; (L)
+		db	0xC6, 0xEE, 0xFE, 0xFE, 0xD6, 0xC6, 0xC6, 0x00	; (M)
+		db	0xC6, 0xE6, 0xF6, 0xDE, 0xCE, 0xC6, 0xC6, 0x00	; (N)
+		db	0x3C, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00	; (O)
+		db	0x7C, 0x66, 0x66, 0x7C, 0x60, 0x60, 0x60, 0x00	; (P)
+		db	0x3C, 0x66, 0x66, 0x66, 0x6E, 0x3C, 0x0E, 0x00	; (Q)
+		db	0x7C, 0x66, 0x66, 0x7C, 0x6C, 0x66, 0x66, 0x00	; (R)
+		db	0x3C, 0x66, 0x70, 0x38, 0x0E, 0x66, 0x3C, 0x00	; (S)
+		db	0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00	; (T)
+		db	0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3E, 0x00	; (U)
+		db	0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x00	; (V)
+		db	0xC6, 0xC6, 0xC6, 0xD6, 0xFE, 0xEE, 0xC6, 0x00	; (W)
+		db	0x66, 0x66, 0x3C, 0x18, 0x3C, 0x66, 0x66, 0x00	; (X)
+		db	0x66, 0x66, 0x66, 0x3C, 0x18, 0x18, 0x18, 0x00	; (Y)
+		db	0xFE, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xFE, 0x00	; (Z)
+		db	0x78, 0x60, 0x60, 0x60, 0x60, 0x60, 0x78, 0x00	; ([)
+		db	0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x02, 0x00	; (\)
+		db	0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, 0x00	; (])
+		db	0x10, 0x38, 0x6C, 0xC6, 0x00, 0x00, 0x00, 0x00	; (^)
+		db	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF	; (_)
+		db	0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00	; (`)
+		db	0x00, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x3A, 0x00	; (a)
+		db	0x60, 0x60, 0x60, 0x7C, 0x66, 0x66, 0x5C, 0x00	; (b)
+		db	0x00, 0x00, 0x3C, 0x66, 0x60, 0x66, 0x3C, 0x00	; (c)
+		db	0x06, 0x06, 0x06, 0x3E, 0x66, 0x66, 0x3A, 0x00	; (d)
+		db	0x00, 0x00, 0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00	; (e)
+		db	0x1C, 0x36, 0x30, 0x78, 0x30, 0x30, 0x30, 0x00	; (f)
+		db	0x00, 0x00, 0x3A, 0x66, 0x66, 0x3E, 0x06, 0x3C	; (g)
+		db	0x60, 0x60, 0x6C, 0x76, 0x66, 0x66, 0x66, 0x00	; (h)
+		db	0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00	; (i)
+		db	0x0C, 0x00, 0x0C, 0x0C, 0x0C, 0xCC, 0xCC, 0x78	; (j)
+		db	0x60, 0x60, 0x66, 0x6C, 0x78, 0x6C, 0x66, 0x00	; (k)
+		db	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00	; (l)
+		db	0x00, 0x00, 0xC6, 0xEE, 0xFE, 0xD6, 0xC6, 0x00	; (m)
+		db	0x00, 0x00, 0x7C, 0x66, 0x66, 0x66, 0x66, 0x00	; (n)
+		db	0x00, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x00	; (o)
+		db	0x00, 0x00, 0x5C, 0x66, 0x66, 0x7C, 0x60, 0x60	; (p)
+		db	0x00, 0x00, 0x3A, 0x66, 0x66, 0x3E, 0x06, 0x06	; (q)
+		db	0x00, 0x00, 0x5C, 0x76, 0x60, 0x60, 0x60, 0x00	; (r)
+		db	0x00, 0x00, 0x3E, 0x60, 0x3C, 0x06, 0x7C, 0x00	; (s)
+		db	0x30, 0x30, 0x7C, 0x30, 0x30, 0x34, 0x18, 0x00	; (t)
+		db	0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3A, 0x00	; (u)
+		db	0x00, 0x00, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x00	; (v)
+		db	0x00, 0x00, 0xC6, 0xD6, 0xFE, 0xFE, 0x6C, 0x00	; (w)
+		db	0x00, 0x00, 0xC6, 0x6C, 0x38, 0x6C, 0xC6, 0x00	; (x)
+		db	0x00, 0x00, 0x66, 0x66, 0x66, 0x3E, 0x06, 0x3C	; (y)
+		db	0x00, 0x00, 0x7E, 0x0C, 0x18, 0x30, 0x7E, 0x00	; (z)
+		db	0x1C, 0x30, 0x30, 0xE0, 0x30, 0x30, 0x1C, 0x00	; ({)
+		db	0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00	; (|)
+		db	0xE0, 0x30, 0x30, 0x1C, 0x30, 0x30, 0xE0, 0x00	; (})
+		db	0x76, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00	; (~)
+		db	0x00, 0x10, 0x38, 0x6C, 0xC6, 0xC6, 0xFE, 0x00	; (.)
+		db	0x0E, 0x1E, 0x36, 0x66, 0x7E, 0x66, 0x66, 0x00	; (.)
+		db	0x7C, 0x60, 0x60, 0x7C, 0x66, 0x66, 0x7C, 0x00	; (.)
+		db	0x7C, 0x66, 0x66, 0x7C, 0x66, 0x66, 0x7C, 0x00	; (.)
+		db	0x7E, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00	; (.)
+		db	0x1C, 0x3C, 0x6C, 0x6C, 0x6C, 0x6C, 0xFE, 0xC6	; (.)
+		db	0x7E, 0x60, 0x60, 0x7C, 0x60, 0x60, 0x7E, 0x00	; (.)
+		db	0xDB, 0xDB, 0x7E, 0x3C, 0x7E, 0xDB, 0xDB, 0x00	; (.)
+		db	0x3C, 0x66, 0x06, 0x1C, 0x06, 0x66, 0x3C, 0x00	; (.)
+		db	0x66, 0x66, 0x6E, 0x7E, 0x76, 0x66, 0x66, 0x00	; (.)
+		db	0x3C, 0x66, 0x6E, 0x7E, 0x76, 0x66, 0x66, 0x00	; (.)
+		db	0x66, 0x6C, 0x78, 0x70, 0x78, 0x6C, 0x66, 0x00	; (.)
+		db	0x0E, 0x1E, 0x36, 0x66, 0x66, 0x66, 0x66, 0x00	; (.)
+		db	0xC6, 0xEE, 0xFE, 0xFE, 0xD6, 0xD6, 0xC6, 0x00	; (.)
+		db	0x66, 0x66, 0x66, 0x7E, 0x66, 0x66, 0x66, 0x00	; (.)
+		db	0x3C, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00	; (.)
+		db	0x7E, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00	; (.)
+		db	0x7C, 0x66, 0x66, 0x66, 0x7C, 0x60, 0x60, 0x00	; (.)
+		db	0x3C, 0x66, 0x60, 0x60, 0x60, 0x66, 0x3C, 0x00	; (.)
+		db	0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00	; (.)
+		db	0x66, 0x66, 0x66, 0x3E, 0x06, 0x66, 0x3C, 0x00	; (.)
+		db	0x7E, 0xDB, 0xDB, 0xDB, 0x7E, 0x18, 0x18, 0x00	; (.)
+		db	0x66, 0x66, 0x3C, 0x18, 0x3C, 0x66, 0x66, 0x00	; (.)
+		db	0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7F, 0x03	; (.)
+		db	0x66, 0x66, 0x66, 0x3E, 0x06, 0x06, 0x06, 0x00	; (.)
+		db	0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xFF, 0x00	; (.)
+		db	0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xFF, 0x03	; (.)
+		db	0xE0, 0x60, 0x60, 0x7C, 0x66, 0x66, 0x7C, 0x00	; (.)
+		db	0xC6, 0xC6, 0xC6, 0xF6, 0xDE, 0xDE, 0xF6, 0x00	; (.)
+		db	0x60, 0x60, 0x60, 0x7C, 0x66, 0x66, 0x7C, 0x00	; (.)
+		db	0x78, 0x8C, 0x06, 0x3E, 0x06, 0x8C, 0x78, 0x00	; (.)
+		db	0xCE, 0xDB, 0xDB, 0xFB, 0xDB, 0xDB, 0xCE, 0x00	; (.)
+		db	0x3E, 0x66, 0x66, 0x66, 0x3E, 0x36, 0x66, 0x00	; (.)
+		db	0x00, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x3A, 0x00	; (.)
+		db	0x00, 0x3C, 0x60, 0x3C, 0x66, 0x66, 0x3C, 0x00	; (.)
+		db	0x00, 0x00, 0x7C, 0x66, 0x7C, 0x66, 0x7C, 0x00	; (.)
+		db	0x00, 0x00, 0x7E, 0x60, 0x60, 0x60, 0x60, 0x00	; (.)
+		db	0x00, 0x00, 0x1C, 0x3C, 0x6C, 0x6C, 0xFE, 0x82	; (.)
+		db	0x00, 0x00, 0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00	; (.)
+		db	0x00, 0x00, 0xDB, 0x7E, 0x3C, 0x7E, 0xDB, 0x00	; (.)
+		db	0x00, 0x00, 0x3C, 0x66, 0x0C, 0x66, 0x3C, 0x00	; (.)
+		db	0x00, 0x00, 0x66, 0x6E, 0x7E, 0x76, 0x66, 0x00	; (.)
+		db	0x00, 0x18, 0x66, 0x6E, 0x7E, 0x76, 0x66, 0x00	; (.)
+		db	0x00, 0x00, 0x66, 0x6C, 0x78, 0x6C, 0x66, 0x00	; (.)
+		db	0x00, 0x00, 0x0E, 0x1E, 0x36, 0x66, 0x66, 0x00	; (.)
+		db	0x00, 0x00, 0xC6, 0xFE, 0xFE, 0xD6, 0xD6, 0x00	; (.)
+		db	0x00, 0x00, 0x66, 0x66, 0x7E, 0x66, 0x66, 0x00	; (.)
+		db	0x00, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x00	; (.)
+		db	0x00, 0x00, 0x7E, 0x66, 0x66, 0x66, 0x66, 0x00	; (.)
+		db	0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44	; (.)
+		db	0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA	; (.)
+		db	0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77	; (.)
+		db	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18	; (.)
+		db	0x18, 0x18, 0x18, 0xF8, 0x18, 0x18, 0x18, 0x18	; (.)
+		db	0x18, 0xF8, 0x18, 0xF8, 0x18, 0x18, 0x18, 0x18	; (.)
+		db	0x36, 0x36, 0x36, 0xF6, 0x36, 0x36, 0x36, 0x36	; (.)
+		db	0x00, 0x00, 0x00, 0xFE, 0x36, 0x36, 0x36, 0x36	; (.)
+		db	0x00, 0xF8, 0x18, 0xF8, 0x18, 0x18, 0x18, 0x18	; (.)
+		db	0x36, 0xF6, 0x06, 0xF6, 0x36, 0x36, 0x36, 0x36	; (.)
+		db	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36	; (.)
+		db	0x00, 0xFE, 0x06, 0xF6, 0x36, 0x36, 0x36, 0x36	; (.)
+		db	0x36, 0xF6, 0x06, 0xFE, 0x00, 0x00, 0x00, 0x00	; (.)
+		db	0x36, 0x36, 0x36, 0xFE, 0x00, 0x00, 0x00, 0x00	; (.)
+		db	0x18, 0xF8, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00	; (.)
+		db	0x00, 0x00, 0x00, 0xF8, 0x18, 0x18, 0x18, 0x18	; (.)
+		db	0x18, 0x18, 0x18, 0x1F, 0x00, 0x00, 0x00, 0x00	; (.)
+		db	0x18, 0x18, 0x18, 0xFF, 0x00, 0x00, 0x00, 0x00	; (.)
+		db	0x00, 0x00, 0x00, 0xFF, 0x18, 0x18, 0x18, 0x18	; (.)
+		db	0x18, 0x18, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x18	; (.)
+		db	0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00	; (.)
+		db	0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18	; (.)
+		db	0x18, 0x1F, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x18	; (.)
+		db	0x36, 0x36, 0x36, 0x37, 0x36, 0x36, 0x36, 0x36	; (.)
+		db	0x36, 0x37, 0x30, 0x3F, 0x00, 0x00, 0x00, 0x00	; (.)
+		db	0x00, 0x3F, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36	; (.)
+		db	0x36, 0xF7, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00	; (.)
+		db	0x00, 0xFF, 0x00, 0xF7, 0x36, 0x36, 0x36, 0x36	; (.)
+		db	0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36	; (.)
+		db	0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00	; (.)
+		db	0x36, 0xF7, 0x00, 0xF7, 0x36, 0x36, 0x36, 0x36	; (.)
+		db	0x18, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00	; (.)
+		db	0x36, 0x36, 0x36, 0xFF, 0x00, 0x00, 0x00, 0x00	; (.)
+		db	0x00, 0xFF, 0x00, 0xFF, 0x18, 0x18, 0x18, 0x18	; (.)
+		db	0x00, 0x00, 0x00, 0xFF, 0x36, 0x36, 0x36, 0x36	; (.)
+		db	0x36, 0x36, 0x36, 0x3F, 0x00, 0x00, 0x00, 0x00	; (.)
+		db	0x18, 0x1F, 0x18, 0x1F, 0x00, 0x00, 0x00, 0x00	; (.)
+		db	0x00, 0x1F, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x18	; (.)
+		db	0x00, 0x00, 0x00, 0x3F, 0x36, 0x36, 0x36, 0x36	; (.)
+		db	0x36, 0x36, 0x36, 0xFF, 0x36, 0x36, 0x36, 0x36	; (.)
+		db	0x18, 0xFF, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18	; (.)
+		db	0x18, 0x18, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00	; (.)
+		db	0x00, 0x00, 0x00, 0x1F, 0x18, 0x18, 0x18, 0x18	; (.)
+		db	0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF	; (.)
+		db	0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF	; (.)
+		db	0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0	; (.)
+		db	0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F	; (.)
+		db	0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00	; (.)
+		db	0x00, 0x00, 0x7C, 0x66, 0x66, 0x7C, 0x60, 0x00	; (.)
+		db	0x00, 0x00, 0x3C, 0x66, 0x60, 0x66, 0x3C, 0x00	; (.)
+		db	0x00, 0x00, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x00	; (.)
+		db	0x00, 0x00, 0x66, 0x66, 0x3E, 0x06, 0x7C, 0x00	; (.)
+		db	0x00, 0x00, 0x7E, 0xDB, 0xDB, 0x7E, 0x18, 0x00	; (.)
+		db	0x00, 0x00, 0x66, 0x3C, 0x18, 0x3C, 0x66, 0x00	; (.)
+		db	0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x7F, 0x03	; (.)
+		db	0x00, 0x00, 0x66, 0x66, 0x3E, 0x06, 0x06, 0x00	; (.)
+		db	0x00, 0x00, 0xDB, 0xDB, 0xDB, 0xDB, 0xFF, 0x00	; (.)
+		db	0x00, 0x00, 0xDB, 0xDB, 0xDB, 0xDB, 0xFF, 0x03	; (.)
+		db	0x00, 0x00, 0xE0, 0x60, 0x7C, 0x66, 0x7C, 0x00	; (.)
+		db	0x00, 0x00, 0xC6, 0xC6, 0xF6, 0xDE, 0xF6, 0x00	; (.)
+		db	0x00, 0x00, 0x60, 0x60, 0x7C, 0x66, 0x7C, 0x00	; (.)
+		db	0x00, 0x00, 0x7C, 0x06, 0x3E, 0x06, 0x7C, 0x00	; (.)
+		db	0x00, 0x00, 0xCE, 0xDB, 0xFB, 0xDB, 0xCE, 0x00	; (.)
+		db	0x00, 0x00, 0x3E, 0x66, 0x3E, 0x36, 0x66, 0x00	; (.)
+		db	0x00, 0x00, 0xFE, 0x00, 0xFE, 0x00, 0xFE, 0x00	; (.)
+		db	0x10, 0x10, 0x7C, 0x10, 0x10, 0x00, 0x7C, 0x00	; (.)
+		db	0x00, 0x30, 0x18, 0x0C, 0x06, 0x0C, 0x18, 0x30	; (.)
+		db	0x00, 0x0C, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0C	; (.)
+		db	0x0E, 0x1B, 0x1B, 0x18, 0x18, 0x18, 0x18, 0x18	; (.)
+		db	0x18, 0x18, 0x18, 0x18, 0x18, 0xD8, 0xD8, 0x70	; (.)
+		db	0x00, 0x18, 0x18, 0x00, 0x7E, 0x00, 0x18, 0x18	; (.)
+		db	0x00, 0x76, 0xDC, 0x00, 0x76, 0xDC, 0x00, 0x00	; (.)
+		db	0x00, 0x38, 0x6C, 0x6C, 0x38, 0x00, 0x00, 0x00	; (.)
+		db	0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00	; (.)
+		db	0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00	; (.)
+		db	0x03, 0x02, 0x06, 0x04, 0xCC, 0x68, 0x38, 0x10	; (.)
+		db	0x3C, 0x42, 0x99, 0xA1, 0xA1, 0x99, 0x42, 0x3C	; (.)
+		db	0x30, 0x48, 0x10, 0x20, 0x78, 0x00, 0x00, 0x00	; (.)
+		db	0x00, 0x00, 0x7C, 0x7C, 0x7C, 0x7C, 0x00, 0x00	; (.)
+		db	0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x7E, 0x00	; (.)

File src/lcd.asm

View file
  • Ignore whitespace
+    include <io.inc>
+
+macro wait_lcd
+    ex   (sp), hl
+    ex   (sp), hl
+    inc  (hl)
+    dec  (hl)
+endmacro
+
+lcd_init:
+    ld   a, 02h
+    out  (PORT_LCD_CMD),a
+    wait_lcd
+    ld   a, 01h
+    out  (PORT_LCD_CMD),a
+    wait_lcd
+    ld   a, 05h
+    out  (PORT_LCD_CMD),a
+    wait_lcd
+    ld   a, 03h
+    out  (PORT_LCD_CMD),a
+    ret
+
+lcd_set_x:
+    add   a, 20h
+    out  (PORT_LCD_CMD),a
+    wait_lcd
+    ret
+
+lcd_set_y:
+    add   a, 80h
+    out  (PORT_LCD_CMD),a
+    wait_lcd
+    ret
+
+;; a : x
+;; b : y
+;; c : char
+lcd_print_char:
+    push ix
+    push de
+    ld     e, c
+    ld     d, 0
+    call lcd_set_x
+    repeat 3
+        sla  b
+        sla  e
+        rl   d
+    endrepeat
+    ld     ix, font
+    add    ix, de
+    ld   a, b
+    call lcd_set_y
+    repeat 8
+1:
+        in a, ($10) ;bit 7 set if LCD is busy
+        rla
+        jr c, 1b
+        ld   a, (ix)
+        out  (PORT_LCD_DATA), a
+        inc  b
+        inc  ix
+    endrepeat
+    pop de
+    pop ix
+    ret
+
+;; a: x
+;; b: y
+;; hl: string
+lcd_print_string:
+    push de
+    ld   d, a
+    ld   e, b
+2:  ld   a, (hl)
+    and  a
+    jr   z, 1f
+    ld   c, a
+    ld   a, d
+    ld   b, e
+    call lcd_print_char
+    inc  hl
+    inc  d
+    jr   2b
+1:  pop  de
+    ret

File src/main.asm

View file
  • Ignore whitespace
+    output ti84rpn.rom
+
+    defpage 0..63, 0, 16384
+
+    page 0
+    include "vector.asm"
+    include "boot.asm"
+    include "lcd.asm"
+    include "font.asm"
+
+    page 63
+    include "fake_boot.asm"

File src/vector.asm

View file
  • Ignore whitespace
+    code @ 0000h
+rst:
+    jp boot
+
+    code @ 0026h
+    db 0
+
+    code @ 0038h
+sysint:
+    jp boot
+
+    code @ 0053h
+    jp boot
+
+    code @ 0056h
+    db 0xFF, 0xA5, 0xFF

File ti84rpn.sav

View file
  • Ignore whitespace
+MODEL = ti84p