; Check charset bitmaps. ; Version 1.0 ; $Id: charset.a48 390 2003-07-19 12:41:28Z sgust $ ; History: ; Version 1.0 ; first release ; This program shows one char surrounded by the 4 sprites set to checkboards, ; so that the exact pixel positions of the char can be seen. ; Press "1" for next char or "0" for previous char. ; I have used this together with charscan.a48 to check the o2em char bitmap ; data. ; Copyright (C) 2003 by Soeren Gust, sgust@ithh.informationstheater.de ; Permission is hereby granted, free of charge, to any person obtaining a copy ; of this software and associated documentation files (the "Software"), to deal ; in the Software without restriction, including without limitation the rights ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ; copies of the Software, and to permit persons to whom the Software is ; furnished to do so, subject to the following conditions: ; The above copyright notice and this permission notice shall be included in ; all copies or substantial portions of the Software. ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ; THE SOFTWARE. ; You can always get the latest version at http://soeren.informationstheater.de ; This is ugly, badly commented, unsupported code! cpu 8048 org 400h include "g7000.h" iram_char equ 020h jmp selectgame ; RESET jmp irq ; interrupt jmp timer ; timer jmp vsyncirq ; VSYNC-interrupt jmp start ; after selectgame jmp soundirq ; sound-interrupt timer retr ; we don't need timer start call gfxoff section setshape mov r0,#vdc_spr0_shape mov r2,#32 mov a,#0aah .loop movx @r0,a cpl a inc r0 djnz r2,.loop endsection setshape section setpos mov r0,#vdc_spr0_ctrl mov r1,#spritedata & 0ffh mov r2,#16 .loop mov a,r1 movp a,@a movx @r0,a inc r0 inc r1 djnz r2,.loop endsection setpos jmp spritedata_end spritedata db 020h, 028h, col_spr_green, 0 db 030h, 020h, col_spr_green, 0 db 030h, 030h, col_spr_green, 0 db 040h, 028h, col_spr_green, 0 spritedata_end mov r0,#iram_char mov a,#0 mov @r0,a mainloop call gfxoff mov r0,#iram_char mov a,@r0 mov r5,a mov r0,#vdc_char0 mov r3,#28h ; x-position mov r4,#30h ; y-position mov r6,#col_chr_white call printchar ; print it call gfxon keyloop call waitforkey jz .key0 dec a jz .key1 jmp keyloop .key0 mov r0,#iram_char mov a,@r0 dec a mov @r0,a jmp mainloop .key1 mov r0,#iram_char mov a,@r0 inc a mov @r0,a jmp mainloop