diff --git a/host/END.s b/host/END.s index bc46e95..fe880d5 100644 --- a/host/END.s +++ b/host/END.s @@ -1,140 +1,2 @@ -inverse_factor_value: ;lookup 00000001 --gives--> 10000000 , etc etc. only 1st 1 in binary numbers -NOP -.byte %10000000, %01000000; (inverse factor value) -NOP -.byte %00100000; (inverse factor value) -NOP -NOP;.byte $0; (log) -NOP;.byte $1; (log) -.byte %00010000; (inverse factor value) -log: -NOP -.byte $0; (log) -.byte $1; (log) -NOP -.byte $2 -NOP -NOP -.byte %00001000; (inverse factor value) -.byte $3 -NOP -NOP -;; i put another lookup table where nops normaly are' -binary_factor: -.byte %10000000, %01000000, %00100000, %00010000, %00001000, %00000100, %00000010, %00000001; (binary factor) -;; ^(log) -NOP -NOP -NOP -NOP -.byte %00000100; (inverse factor value) -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -.byte $5 -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -.byte %00000010; (inverse factor value) - -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -.byte $6 -;; i put another lookup table where nops normaly are -Bitmap = $4000 -;;This is used by pixel_draw! look at it for more detail -big_y_offset: - .lobytes $0000 + Bitmap - .hibytes $0000 + Bitmap - .lobytes $0140 + Bitmap - .hibytes $0140 + Bitmap - .lobytes $0280 + Bitmap - .hibytes $0280 + Bitmap - .lobytes $03C0 + Bitmap - .hibytes $03C0 + Bitmap - .lobytes $0500 + Bitmap - .hibytes $0500 + Bitmap - .lobytes $0640 + Bitmap - .hibytes $0640 + Bitmap - .lobytes $0780 + Bitmap - .hibytes $0780 + Bitmap - .lobytes $08C0 + Bitmap - .hibytes $08C0 + Bitmap - .lobytes $0A00 + Bitmap - .hibytes $0A00 + Bitmap - .lobytes $0B40 + Bitmap - .hibytes $0B40 + Bitmap - .lobytes $0C80 + Bitmap - .hibytes $0C80 + Bitmap - .lobytes $0DC0 + Bitmap - .hibytes $0DC0 + Bitmap - .lobytes $0F00 + Bitmap - .hibytes $0F00 + Bitmap - .lobytes $1040 + Bitmap - .hibytes $1040 + Bitmap - .lobytes $1180 + Bitmap - .hibytes $1180 + Bitmap - .lobytes $12C0 + Bitmap - .hibytes $12C0 + Bitmap - .lobytes $1400 + Bitmap - .hibytes $1400 + Bitmap - .lobytes $1540 + Bitmap - .hibytes $1540 + Bitmap - .lobytes $1680 + Bitmap - .hibytes $1680 + Bitmap - .lobytes $17C0 + Bitmap - .hibytes $17C0 + Bitmap - .lobytes $1900 + Bitmap - .hibytes $1900 + Bitmap - .lobytes $1A40 + Bitmap - .hibytes $1A40 + Bitmap - .lobytes $1B80 + Bitmap - .hibytes $1B80 + Bitmap - .lobytes $1CC0 + Bitmap - .hibytes $1CC0 + Bitmap - .lobytes $1E00 + Bitmap - .hibytes $1E00 + Bitmap -NOP -NOP -NOP -NOP -.byte %00000001 -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -.byte $7 +;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*- +END_OF_PROGRAM: diff --git a/host/lookup_tables.s b/host/lookup_tables.s new file mode 100644 index 0000000..bc46e95 --- /dev/null +++ b/host/lookup_tables.s @@ -0,0 +1,140 @@ +inverse_factor_value: ;lookup 00000001 --gives--> 10000000 , etc etc. only 1st 1 in binary numbers +NOP +.byte %10000000, %01000000; (inverse factor value) +NOP +.byte %00100000; (inverse factor value) +NOP +NOP;.byte $0; (log) +NOP;.byte $1; (log) +.byte %00010000; (inverse factor value) +log: +NOP +.byte $0; (log) +.byte $1; (log) +NOP +.byte $2 +NOP +NOP +.byte %00001000; (inverse factor value) +.byte $3 +NOP +NOP +;; i put another lookup table where nops normaly are' +binary_factor: +.byte %10000000, %01000000, %00100000, %00010000, %00001000, %00000100, %00000010, %00000001; (binary factor) +;; ^(log) +NOP +NOP +NOP +NOP +.byte %00000100; (inverse factor value) +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +.byte $5 +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +.byte %00000010; (inverse factor value) + +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +.byte $6 +;; i put another lookup table where nops normaly are +Bitmap = $4000 +;;This is used by pixel_draw! look at it for more detail +big_y_offset: + .lobytes $0000 + Bitmap + .hibytes $0000 + Bitmap + .lobytes $0140 + Bitmap + .hibytes $0140 + Bitmap + .lobytes $0280 + Bitmap + .hibytes $0280 + Bitmap + .lobytes $03C0 + Bitmap + .hibytes $03C0 + Bitmap + .lobytes $0500 + Bitmap + .hibytes $0500 + Bitmap + .lobytes $0640 + Bitmap + .hibytes $0640 + Bitmap + .lobytes $0780 + Bitmap + .hibytes $0780 + Bitmap + .lobytes $08C0 + Bitmap + .hibytes $08C0 + Bitmap + .lobytes $0A00 + Bitmap + .hibytes $0A00 + Bitmap + .lobytes $0B40 + Bitmap + .hibytes $0B40 + Bitmap + .lobytes $0C80 + Bitmap + .hibytes $0C80 + Bitmap + .lobytes $0DC0 + Bitmap + .hibytes $0DC0 + Bitmap + .lobytes $0F00 + Bitmap + .hibytes $0F00 + Bitmap + .lobytes $1040 + Bitmap + .hibytes $1040 + Bitmap + .lobytes $1180 + Bitmap + .hibytes $1180 + Bitmap + .lobytes $12C0 + Bitmap + .hibytes $12C0 + Bitmap + .lobytes $1400 + Bitmap + .hibytes $1400 + Bitmap + .lobytes $1540 + Bitmap + .hibytes $1540 + Bitmap + .lobytes $1680 + Bitmap + .hibytes $1680 + Bitmap + .lobytes $17C0 + Bitmap + .hibytes $17C0 + Bitmap + .lobytes $1900 + Bitmap + .hibytes $1900 + Bitmap + .lobytes $1A40 + Bitmap + .hibytes $1A40 + Bitmap + .lobytes $1B80 + Bitmap + .hibytes $1B80 + Bitmap + .lobytes $1CC0 + Bitmap + .hibytes $1CC0 + Bitmap + .lobytes $1E00 + Bitmap + .hibytes $1E00 + Bitmap +NOP +NOP +NOP +NOP +.byte %00000001 +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +.byte $7 diff --git a/host/source.s b/host/source.s index 30a16b4..96fb898 100644 --- a/host/source.s +++ b/host/source.s @@ -44,5 +44,6 @@ JMP exit ;batch_userprog: ;.incbin "userprog.bin", 0, 1024 +.include "lookup_tables.s" .include "END.s"