Irmen de Jong
1d2ce2cbeb
consolidate IR line parse function
2022-09-27 18:02:57 +02:00
Irmen de Jong
1a56743bb1
fix IR repeat loop codegen when amount is 0
2022-09-25 20:48:17 +02:00
Irmen de Jong
dda19c29fe
vm: fix symbols to be case sensitive properly in p8virt assembler
2022-09-25 15:51:50 +02:00
Irmen de Jong
0e1886e6bd
vm: fix nested label prefixing
2022-09-24 16:00:25 +02:00
Irmen de Jong
c26e116f0e
vm: fix crashes when array contains pointers/strings
2022-09-24 14:42:07 +02:00
Irmen de Jong
5c9c7f2c5e
adding more complex vm examples
2022-09-23 14:56:06 +02:00
Irmen de Jong
ca2fb6cef3
IR no longer depends on VM syscalls but has its own syscall list for the few builtin functions that still require it
2022-09-23 14:27:51 +02:00
Irmen de Jong
46dac909ef
vm/math.p8: complete the sin and cos routines
2022-09-22 15:49:19 +02:00
Irmen de Jong
b1e4347e10
fix compiler crash sometimes when casting byte to word
2022-09-22 13:00:47 +02:00
Irmen de Jong
97aa91c75e
removed 16 bits sin/cos routines from math library (sin16, sin16r etc)
2022-09-22 12:55:00 +02:00
Irmen de Jong
11d87e4725
VM: support cpu registers
2022-09-19 17:13:46 +02:00
Irmen de Jong
627ed51a1b
IR: mem mapped vars and memory slabs
2022-09-19 15:20:40 +02:00
Irmen de Jong
2f3e7d1c27
IR support for storing incbins and romsubs
2022-09-17 16:07:41 +02:00
Irmen de Jong
0e831d4b92
fix superfluous usage of addressOf()
2022-09-16 00:31:04 +02:00
Irmen de Jong
6428ced157
added subroutine params to IRSubroutine
2022-09-13 23:06:05 +02:00
Irmen de Jong
30a42ec1bd
IR tweak
2022-09-13 23:06:05 +02:00
Irmen de Jong
aacea3e9db
incbin in IR
2022-09-13 23:06:05 +02:00
Irmen de Jong
6886b61186
also output inline asm chunks
2022-09-13 23:06:05 +02:00
Irmen de Jong
0744c9fa29
properly flatten label names for the IR code
2022-09-13 23:06:05 +02:00
Irmen de Jong
502a665ffc
getting address-of into IR without allocations
2022-09-13 23:06:05 +02:00
Irmen de Jong
3c315703c0
making IR file reader
2022-09-13 23:06:05 +02:00
Irmen de Jong
12ed07a607
comments
2022-09-13 23:06:05 +02:00
Irmen de Jong
97f4316653
rename IR classes
2022-09-13 23:06:05 +02:00
Irmen de Jong
a182b13e5a
fixup for memoryslabs
2022-09-13 23:06:05 +02:00
Irmen de Jong
80b630a1e4
added memoryslabs to symboltable
2022-09-13 23:06:05 +02:00
Irmen de Jong
475efbe007
steps to make actual IR based on VM code. For now, as experimental codegen.
2022-09-13 23:06:05 +02:00
Irmen de Jong
c6c5ff2089
added joystick controls to cx16 tehtriz
2022-08-23 18:11:35 +02:00
Irmen de Jong
176ec8ac7d
fix 6502 codegen bug: complex comparison expression is evaluated wrong.
...
Fixed by reintroducing splitting of comparison expression in if statements by using a temporary variable and/or register to precompute left/right values.
2022-08-23 00:05:57 +02:00
Irmen de Jong
dcdd4b3255
found bug in comparison expr codegen
2022-08-22 23:16:56 +02:00
Irmen de Jong
fc0a0105b3
move memoryslab administration from allocator to symboltable
2022-08-21 19:48:56 +02:00
Irmen de Jong
6454bf8ec4
added mouse cursor to amiga example
...
slightly sped up text rendering in gfx2 highres mode
2022-08-16 04:25:59 +02:00
Irmen de Jong
7ef4ddf0f3
fixed operator precedence: bitwise must come before comparisons
2022-08-14 12:34:00 +02:00
Irmen de Jong
d8e18df3a1
added c64 starfield example
2022-08-14 12:02:23 +02:00
Irmen de Jong
0aa0ec5abd
fix c64 zeropage locations of cx16 virtual registers
2022-08-13 00:14:19 +02:00
Irmen de Jong
b6eef3612f
added some ported bench8 test programs
2022-08-12 22:08:27 +02:00
Irmen de Jong
44ee4b989f
optimize code for logical expressions more if right operand is simple
2022-08-12 00:49:40 +02:00
Irmen de Jong
18790d867c
optimize conditional expression WORD & $ff00 to just msb(WORD)&$ff
2022-08-12 00:21:44 +02:00
Irmen de Jong
d6b8936376
fix mkword(@(ptr), 0) wrong asm
2022-08-11 23:01:19 +02:00
Irmen de Jong
4d840c7db8
optimized mkword(0, X)
2022-08-11 22:51:09 +02:00
Irmen de Jong
4d2b21816d
optimized uword <<8 and >>8
2022-08-11 22:25:15 +02:00
Irmen de Jong
2d34fdd28f
in a block marked option force_output, make all subroutines in asm use .block rather than .proc
...
this fixes some obscure assembly issues where subroutines were omitted from the output program by 64tass
2022-08-10 21:28:40 +02:00
Irmen de Jong
68abda1219
fix a few small compiler errors (removing functioncall, removing block, assigning virtual register return value)
2022-08-09 23:38:29 +02:00
Irmen de Jong
f778f08f76
tweak
2022-08-08 21:09:49 +02:00
Irmen de Jong
ac1bd2fb7b
virtual: properly output "memmapped" variables too
...
still as regular variables though
2022-08-08 20:42:17 +02:00
Irmen de Jong
4b7b1379d9
also binexpr split on and,or,xor if appropriate
2022-08-08 00:09:18 +02:00
Irmen de Jong
1e441c2ddf
tweak vm codegen
2022-08-07 13:45:03 +02:00
Irmen de Jong
f718f4251b
working on better encoding of romsub in new ast/vmtarget
2022-08-07 12:21:10 +02:00
Irmen de Jong
197081f10d
keyboardhandler
2022-08-04 23:04:16 +02:00
Irmen de Jong
00b717cde8
tweak
2022-08-04 18:35:10 +02:00
Irmen de Jong
a0deb463c9
optimized codegen for some equality comparison expressions and some logical expressions
2022-07-31 15:25:54 +02:00
Irmen de Jong
90ddec2ad8
avoid multiple change events in watch mode
...
added bsieve example
2022-07-31 11:58:27 +02:00
Irmen de Jong
f531daa872
on C64, the cx16.r0...cx16.r15 virtual regs are now in zeropage as well when using kernalsafe or full
2022-07-28 19:13:33 +02:00
Irmen de Jong
046dceb5c2
added optimized case for signed division by 2
2022-07-24 13:59:35 +02:00
Irmen de Jong
dcc1f00048
fix rounding errors in signed divide by power-of-two
...
The optimized bit-shifting division is removed (for now)
2022-07-24 12:34:55 +02:00
Irmen de Jong
05f935b598
simplify & fix recursion detector
2022-07-22 22:22:43 +02:00
Irmen de Jong
aeabf0f324
nicer colors
2022-07-17 21:37:15 +02:00
Irmen de Jong
7d4695c5b2
cx16: graphics module y resolution corrected from 200 to 240. added 'cx16/circles' example.
2022-07-17 18:59:52 +02:00
Irmen de Jong
8e1071aa89
fix compiler crashes: txt.chrout("a"), uword[] a = ["ls", subroutine] without & before subroutine.
2022-07-15 23:17:03 +02:00
Irmen de Jong
f690f58bd4
callfar() now accepts a variable as address, so it can be used to indirect JSR to a subroutine whose address is not fixed. ('goto' already could indirect JMP to a variable address.)
2022-07-14 19:29:59 +02:00
Irmen de Jong
2d600da8b6
fix codegen crash on certain nested typecast
2022-07-13 22:24:31 +02:00
Irmen de Jong
35af53828a
fix endless loop in optimizer, fix cx16 register clobbering in psg interrupt handler, fix crash on certain arrays, fix undefined symbol when it's in another imported module
2022-07-13 18:42:06 +02:00
Irmen de Jong
10ddd5b127
fixed missing non-boolean operand cast in logical expressions
2022-07-12 22:28:06 +02:00
Irmen de Jong
edf12bec71
improve bool params typecasting, fix compiler crash on abs(floatvar)
2022-07-12 17:52:37 +02:00
Irmen de Jong
ff1fc28287
added immediate value vm logical instructions because these are so common
2022-07-12 16:12:32 +02:00
Irmen de Jong
314398ba4c
added immediate value vm arithmetic instructions because these are so common
2022-07-12 15:21:26 +02:00
Irmen de Jong
68da661edc
optimize comparison to true/1 into comparison to zero, optimize while/until conditions
2022-07-11 16:42:52 +02:00
Irmen de Jong
88cbb6913d
tweak bool type handling
2022-07-11 14:55:50 +02:00
Irmen de Jong
7a26646e1b
tweak bool type handling
2022-07-11 02:08:12 +02:00
Irmen de Jong
fb63434eee
tweak maze example
2022-07-09 22:13:30 +02:00
Irmen de Jong
97f90d9684
Merge branch 'master' into bool_type
2022-07-09 22:09:49 +02:00
Irmen de Jong
f91786367f
added maze example
2022-07-09 22:00:46 +02:00
Irmen de Jong
211e2bb37a
improved bool type checking
2022-07-08 22:29:13 +02:00
Irmen de Jong
d2d08bf143
fix compiler error about bool vs ubyte
2022-07-08 22:03:05 +02:00
Irmen de Jong
8acb37b6c2
use bool type in examples and libraries
2022-07-08 21:50:32 +02:00
Irmen de Jong
81b3d2db4f
fix compiler crash
2022-07-08 21:50:06 +02:00
Irmen de Jong
1dfa8ee7d8
add ARRAY_BOOL array type
2022-07-07 23:07:30 +02:00
Irmen de Jong
1163543a98
fix bool param lookup problem
2022-07-07 22:23:56 +02:00
Irmen de Jong
bdb7de34be
added several compiler checks against weird boolean type use in expressions
2022-07-07 22:23:56 +02:00
Irmen de Jong
9500fc11ac
document new bool datatype and removal of boolean() conversion function
2022-07-07 22:23:56 +02:00
Irmen de Jong
41f4e22a17
introduce BOOL type
2022-07-07 22:23:56 +02:00
Irmen de Jong
ea2812f50f
add max volume to psg envelope
2022-07-03 11:26:56 +02:00
Irmen de Jong
3ec05709d5
convert the sounds in cx16 tehtriz to use the psg module instead
2022-07-03 01:40:29 +02:00
Irmen de Jong
4bdac7404a
added sustain to psg envelope
2022-07-03 00:55:25 +02:00
Irmen de Jong
cc41218d37
added nicer vm example
2022-07-03 00:41:04 +02:00
Irmen de Jong
7a3745f642
psg tweaks
2022-07-02 20:33:40 +02:00
Irmen de Jong
f8658f6afa
precalc vera freq to not use floating point math anymore
2022-07-02 19:40:18 +02:00
Irmen de Jong
223b725a10
psg abstraction and attack/release envelope
2022-07-02 18:47:12 +02:00
Irmen de Jong
25aad8d7be
improve const-evaluation of builtin expressions
2022-07-02 16:29:01 +02:00
Irmen de Jong
b2c9b7635d
revert restriction on certain associative operator reshuffling
...
it caused larger generated code
2022-07-02 13:59:24 +02:00
Irmen de Jong
24d13dd120
fix problematic optimizations to logical expressions
2022-07-02 00:56:24 +02:00
Irmen de Jong
965340ff90
logical and/or/xor/not all replaced by bitwise &,|,^,~ (ast, codegens)
...
this also fixed some invalid outcomes of logical expressions!
2022-07-02 00:38:17 +02:00
Irmen de Jong
8e36fe6bef
temporary workaround for code problem around 'not'
2022-07-01 01:01:15 +02:00
Irmen de Jong
f675dbc726
vm var allocator now also recognises the memory-mapped variables. no longer crashes
2022-06-30 22:09:49 +02:00
Irmen de Jong
2ad4fdbbb9
added cx16 version of bdmusic, needs ADSR though
2022-06-30 21:33:48 +02:00
Irmen de Jong
97cb0cbd08
tweak "not" removal/rewriting
2022-06-30 02:16:30 +02:00
Irmen de Jong
ef92451d1a
fix logical expressions on arbitrary values, for now with boolean() around the operands
2022-06-28 01:18:36 +02:00
Irmen de Jong
06184bdcb1
get rid of failed mccarthy shortcut evaluation
2022-06-27 21:44:52 +02:00
Irmen de Jong
af98d01053
failed attempt at McCarthy shortcut evaluation
2022-06-27 21:40:48 +02:00
Irmen de Jong
bb1cda0916
fix: boolean values of terms in logical expressions are now properly evaluated
2022-06-26 23:55:34 +02:00
Irmen de Jong
a6d0ea347c
bank caching not required for pcm_play()
2022-06-26 22:08:10 +02:00