Last active
February 18, 2025 10:47
-
-
Save fu-sen/7bca13a20bee5ebca75f3c416f720ed9 to your computer and use it in GitHub Desktop.
LED test - PC-E200 / G siries (Other than PC-G815, PC-G850) https://github.com/z88dk/z88dk/issues/2664
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
zcc +g800 -create-app -bn ledg800 ledg800.c | |
*/ | |
/* | |
gprint data | |
PC-E200/G series other than PC-G815 and PC-G850 have 1 character = 5x7 dots, | |
so 1 character is 5 bytes, and there is no data between characters. | |
and 0x80 is not drawn. | |
char balloon[5] = {0x4e, 0x5f, 0x3f, 0x1d, 0x0e}; | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
void main() | |
{ | |
while(getk()); | |
outp (0x58,0xc0); /* y scroll reset */ | |
for (int y=0; y<8; y++) { | |
outp (0x58,0xb8+y); | |
/* y position 0xb8+y (0-7, 0xc0) | |
0xc0-0xff changes this state! | |
+----------------------+ | |
|b8h | bch| | |
|b9h | bdh| | |
|bah | beh| | |
|bbh | bfh| | |
+----------------------+ | |
*/ | |
outp (0x58, 0x40); | |
/* x position 040+x (0-59) | |
60 = 12 charcters x 5 dots | |
+-----------------------+ | |
|40h ... 7bh|7bh ... 40h| | |
|40h ... 7bh|7bh ... 40h| | |
|40h ... 7bh|7bh ... 40h| | |
|40h ... 7bh|7bh ... 40h| | |
+-----------------------+ | |
The right half is horizontally reversed!! | |
*/ | |
for (int x=0; x<12; x++) { | |
/* 0x58 setiing to 0x5a write, 0x5b read */ | |
outp (0x5a, 0x4e); | |
outp (0x5a, 0x5f); | |
outp (0x5a, 0x3f); | |
outp (0x5a, 0x1d); | |
outp (0x5a, 0x0e); | |
} | |
} | |
while(!getk()); | |
} | |
/* | |
scroll (0-63, line*8?) | |
outp (0x58, 0xc0+y); | |
busy check | |
while (inp(0x59) & 0x80); | |
read | |
d = inp(0x5b): | |
*/ |
Author
fu-sen
commented
Feb 16, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment