Move lookup tables into separate file
This commit is contained in:
parent
d605e299f5
commit
a48937fe3c
3 changed files with 143 additions and 140 deletions
142
host/END.s
142
host/END.s
|
@ -1,140 +1,2 @@
|
||||||
inverse_factor_value: ;lookup 00000001 --gives--> 10000000 , etc etc. only 1st 1 in binary numbers
|
;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*-
|
||||||
NOP
|
END_OF_PROGRAM:
|
||||||
.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
|
|
||||||
|
|
140
host/lookup_tables.s
Normal file
140
host/lookup_tables.s
Normal file
|
@ -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
|
|
@ -44,5 +44,6 @@ JMP exit
|
||||||
|
|
||||||
;batch_userprog:
|
;batch_userprog:
|
||||||
;.incbin "userprog.bin", 0, 1024
|
;.incbin "userprog.bin", 0, 1024
|
||||||
|
.include "lookup_tables.s"
|
||||||
|
|
||||||
.include "END.s"
|
.include "END.s"
|
||||||
|
|
Loading…
Add table
Reference in a new issue