diff --git a/libsrc/atari7800/buildfont160.py b/libsrc/atari7800/buildfont160.py deleted file mode 100644 index 30ee02695..000000000 --- a/libsrc/atari7800/buildfont160.py +++ /dev/null @@ -1,31 +0,0 @@ -blen = 0 - -def gb(val): - b = val[0] << 6 - b = b + (val[1] << 4) - b = b + (val[2] << 2) - b = b + val[3] - return '$' + hex(b)[2:4] - -def printline(f, val): - f.write(" .byte " + - gb(val[0:4]) + ', ' + - gb(val[4:8]) + ', ' + - gb(val[8:12]) + ', ' + - gb(val[12:16]) + ', ' + - gb(val[16:20]) + ', ' + - gb(val[20:24]) + ', ' + - gb(val[24:28]) + ', ' + - gb(val[28:32]) + '\n') - -fname='font160' -with open(fname + '.data', 'rb') as f: - data = f.read() -fname= fname + '.s' -with open(fname, 'w') as f: - f.write(" .export _font160\n") - f.write(' .rodata\n') - f.write(' .align 256\n') - f.write("_font160:\n") - for i in range(0, int(len(data)/32)): - printline(f, data[i * 32:i * 32 + 32]) diff --git a/libsrc/atari7800/font160.png b/libsrc/atari7800/font160.png deleted file mode 100644 index 845d91482..000000000 Binary files a/libsrc/atari7800/font160.png and /dev/null differ diff --git a/libsrc/atari7800/font160flipped.png b/libsrc/atari7800/font160flipped.png deleted file mode 100644 index ae237c74b..000000000 Binary files a/libsrc/atari7800/font160flipped.png and /dev/null differ diff --git a/libsrc/atari7800/wherex.s b/libsrc/atari7800/wherex.s new file mode 100644 index 000000000..3215302ac --- /dev/null +++ b/libsrc/atari7800/wherex.s @@ -0,0 +1,18 @@ +; +; 2022-04-16, Karri Kaksonen +; +; unsigned char wherex() +; + + .export _wherex + .import CURS_X + +;----------------------------------------------------------------------------- +; Get cursor X position +; + .proc _wherex + + lda CURS_X + rts + .endproc + diff --git a/libsrc/atari7800/wherey.s b/libsrc/atari7800/wherey.s new file mode 100644 index 000000000..2223f29ac --- /dev/null +++ b/libsrc/atari7800/wherey.s @@ -0,0 +1,19 @@ +; +; 2022-04-16, Karri Kaksonen +; +; unsigned char wherey() +; + + .export _wherey + .import CURS_Y + +;----------------------------------------------------------------------------- +; Get cursor Y position +; + .proc _wherey + + ldx #0 + lda CURS_Y + rts + .endproc +