Commit Graph

359 Commits

Author SHA1 Message Date
drmortalwombat 9bcec5bf17 Destructors when leaving scopes the normal way 2023-06-21 22:07:00 +02:00
drmortalwombat b8478348ed Fix nullptr reference cause assert in linux 2023-06-18 09:24:50 +02:00
drmortalwombat 962240f09d Fix init state of 32 vsprites mux 2023-06-03 13:01:52 +02:00
drmortalwombat 7d3dc493c0 Fix inter instruction cross block move 2023-05-26 20:16:19 +02:00
drmortalwombat cdbb24b6b2 Add iecbus library 2023-05-21 17:19:26 +02:00
polluks 1616b9335f Fixed typos 2023-05-13 15:57:46 +02:00
drmortalwombat 4aa6b1c47d Improve int dependency in loop analysis 2023-05-07 17:46:53 +02:00
drmortalwombat 0639fdc008 Unify instruction dependency check in optimizer 2023-05-06 18:28:59 +02:00
drmortalwombat df733d09a8 Fix add cross move in native code optimizer 2023-05-01 19:16:25 +02:00
drmortalwombat b1fc2e3736 Add __bankof operator 2023-04-30 18:35:04 +02:00
drmortalwombat e5805716e2 Fix propagation of volatile flags 2023-04-15 21:53:33 +02:00
drmortalwombat bb00b5af12 Add more generic cartridge support 2023-04-14 18:40:27 +02:00
drmortalwombat 78e48c75fd Auto place globals in zero page with -Oz option 2023-04-10 18:26:59 +02:00
drmortalwombat e23ab50512 Add local variables to debug file 2023-04-09 19:19:57 +02:00
drmortalwombat 85df217c50 Add warning for const integer truncation 2023-04-09 09:45:13 +02:00
drmortalwombat d5c347da9b Add vera sprite image 2023-04-07 15:47:08 +02:00
drmortalwombat 6ff2038b0e Add commander X16 VERA library 2023-04-06 21:53:47 +02:00
drmortalwombat 14ab294a47 Add getchx() call to conio 2023-04-02 13:51:53 +02:00
drmortalwombat 36a57c87d8 Add commander x16 as target machine 2023-03-24 21:06:27 +01:00
MonstersGoBoom 3165f65377 corrected oam_clear to be off screen
added nstc/pal detection.
2023-03-23 08:22:19 -04:00
drmortalwombat 9f28fdfcc0 Fix memmove const correctness 2023-03-16 11:59:38 +01:00
drmortalwombat aed086bdb9 Add rom mappers to NES target 2023-03-11 11:01:11 +01:00
drmortalwombat 868564ff08 Add -v3 option for call graph data, change some function in neslib to inline 2023-03-10 17:08:22 +01:00
drmortalwombat efff725745 Improve labels in disassembler listing, add mlb file for nes 2023-03-09 19:29:46 +01:00
drmortalwombat 2959016496 Fix movement of accu train across JSR that uses the same register 2023-03-09 16:25:51 +01:00
drmortalwombat 30680777f3 Fix neslib oam_spr functions 2023-03-09 14:08:59 +01:00
drmortalwombat 4f89ad7680 Add support for Atari 8 bit systems 2023-03-08 15:51:27 +01:00
drmortalwombat 9662f5e69f Loop counter depend index optimizations for small xy loops 2023-03-06 20:34:02 +01:00
drmortalwombat e1606ab6e7 Bump version number 2023-03-05 22:11:28 +01:00
drmortalwombat 9bd7b5cd48 Add device libraries for various C computers 2023-03-05 15:13:02 +01:00
drmortalwombat 6189e0cc49 Prepare NES machine type 2023-03-04 14:07:34 +01:00
drmortalwombat f34aa2dcbe Prepare support for VIC20 and C128 2023-03-02 20:19:47 +01:00
drmortalwombat 4117c9a553 More functions for reu library 2023-02-25 21:02:06 +01:00
drmortalwombat 0bb470939f Add reu library 2023-02-23 14:19:18 +01:00
drmortalwombat 946b1fe53d Add mouse library 2023-01-22 11:01:03 +01:00
drmortalwombat 677de2508b Shuffle temp moves to avoid duplicates 2023-01-21 08:42:22 +01:00
drmortalwombat 29611ec3db Fix striped constant pointer initializer 2023-01-19 19:03:02 +01:00
drmortalwombat 0b30258f80 Dataflow optimizations 2023-01-17 22:42:02 +01:00
drmortalwombat 2f4b2790f6 Register condition block bypassing 2023-01-17 08:02:36 +01:00
drmortalwombat 761206d009 Propagation of unsigend attribute accross function arguments 2023-01-13 20:14:16 +01:00
drmortalwombat 10359224d4 Fix write to CPU port not marked as volatile 2023-01-08 10:38:58 +01:00
drmortalwombat ffe07a6a3c Optimize multiplication with short negative constants 2023-01-07 13:41:59 +01:00
drmortalwombat c105c3b778 Fix error in final code size reduction step 2023-01-03 21:48:50 +01:00
drmortalwombat 1a06102668 Shortcut identical consecutive conditional branches 2022-12-25 22:14:12 +01:00
drmortalwombat 0aa9ca0c70 Bump Version number 2022-12-10 16:15:04 +01:00
drmortalwombat 74f93ca4fb Improve precision of float log function 2022-11-16 20:51:07 +01:00
drmortalwombat 04624f208c Fix multiply add 2n + 1 2022-10-23 17:02:34 +02:00
drmortalwombat 3e59f47748 Loop index optimizations 2022-10-03 10:50:24 +02:00
drmortalwombat 259abf4c4b Improve compiler speed 2022-09-20 15:01:47 +02:00
drmortalwombat c3e89d5d32 Optimize raster mutliplexer 2022-09-18 21:24:34 +02:00
drmortalwombat e50f3f9814 Fix lenient semicolon handling in parser 2022-09-10 10:05:44 +02:00
drmortalwombat 7dd8f4dae3 Fix easyflash placement of auto copied main section 2022-08-25 18:01:58 +02:00
drmortalwombat 67142bdb01 Add charwin get/put rect functions 2022-07-20 08:10:05 +02:00
drmortalwombat 864c8ec9a5 Add samples for 32 and 64 sprite multiplexing 2022-07-18 21:22:12 +02:00
drmortalwombat 0742be3204 Improve dataflow analysis 2022-07-16 14:14:02 +02:00
drmortalwombat 9424723536 Force pra of cia1 to 0xff when starting key check 2022-07-09 16:13:06 +02:00
drmortalwombat fdcaf54666 Add unroll pragma for simple loops 2022-06-30 09:33:11 +02:00
drmortalwombat 350403121d Move load temporary register moves out of loops 2022-06-26 15:15:59 +02:00
drmortalwombat fc7bb2c377 Optimize parameter handling in loops 2022-06-18 17:32:14 +02:00
drmortalwombat 6e37060c24 More aggressive reverse value range limit forwarding 2022-06-12 13:39:46 +02:00
drmortalwombat a81f810a63 Size optimizations 2022-06-10 15:56:08 +02:00
drmortalwombat 36a5eaae00 Propagate independent instructions across diamond shaped basic blocks 2022-06-04 20:56:28 +02:00
drmortalwombat d833ca6834 Use array of struct assignments for index range validation 2022-05-26 13:55:00 +02:00
drmortalwombat 3351ee81cc Extend static stack allocation to zero page spilling 2022-05-22 13:22:36 +02:00
drmortalwombat b42c992a58 Fix buffer overflow in sprintf 2022-05-19 08:30:00 +02:00
drmortalwombat 46fe117f1f add alias _Bool for bool 2022-05-15 10:53:58 +02:00
drmortalwombat 2feb8b9e6d Add srand to stdlib 2022-05-09 22:18:34 +02:00
drmortalwombat 75e5471dd1 Add support for d64 image creation 2022-05-08 15:37:30 +02:00
drmortalwombat 29bd0c8d2d Optimizations for global variables 2022-05-07 14:03:56 +02:00
drmortalwombat ea1fa189b2 Add lz compression for embedded assets 2022-05-01 12:55:13 +02:00
drmortalwombat 72d2fc1fac Reverse integer range limit calculation 2022-04-15 11:06:49 +02:00
drmortalwombat 417574b4bb Fix volatile copy 2022-04-12 22:08:40 +02:00
drmortalwombat 2435797bd1 Optimize x and y index order 2022-04-03 20:39:56 +02:00
drmortalwombat 8bdf48faba add tab output in printf 2022-04-03 15:51:41 +02:00
drmortalwombat 58c99a5dca Add left alignment in padding for printf 2022-04-02 13:36:15 +02:00
drmortalwombat 358def836d Fix optimization for absolute addressing and two indices 2022-04-01 20:35:55 +02:00
drmortalwombat cb4f60b2ff Optimize muldiv8b8y 2022-03-30 20:05:09 +02:00
drmortalwombat d2503aaf1f Constant folding address of global and static variables 2022-03-27 17:18:44 +02:00
drmortalwombat f50613704c Fix moving of abs store across function call 2022-03-26 21:39:30 +01:00
drmortalwombat fc5c9f137a Add indexed const array initializer 2022-03-26 10:29:48 +01:00
drmortalwombat 8c77a5d256 Add "16bit * 8bit / 8bit" to fixed point math library 2022-03-20 22:53:51 +01:00
drmortalwombat b43edb2b4c Avoid inlining of native functions into byte code 2022-03-09 20:27:11 +01:00
drmortalwombat c5fc186336 Add horizontal scroll shmup sample game 2022-03-06 21:49:10 +01:00
drmortalwombat 756245694f Optimize indexed static variable access 2022-02-26 18:10:23 +01:00
drmortalwombat 8b63d5bb34 Shortcut zero page register moves 2022-02-20 14:12:01 +01:00
drmortalwombat fdb112a037 Add constant address calculation for struct members 2022-02-14 20:13:30 +01:00
drmortalwombat d4352ef043 Add __hwinterrupt function decoration 2022-02-06 10:28:09 +01:00
drmortalwombat 49b5067619 Add keyboard scan code enum 2022-02-04 17:40:04 +01:00
drmortalwombat 90a1462ece Add raw functions for putat in charwin 2022-02-01 22:23:38 +01:00
drmortalwombat 3507b09207 Optimize PETSCII conversion in charwin 2022-02-01 22:00:33 +01:00
drmortalwombat 995e39a57d Add missile command sample game 2022-01-31 21:17:14 +01:00
drmortalwombat 94efcaeca6 Circle drawing in multicolor bitmap 2022-01-31 08:08:18 +01:00
drmortalwombat 18be0dfc0b Optimize dynamic code generation 2022-01-29 21:55:52 +01:00
drmortalwombat 08d6358932 Fix local variable array member forwarding 2022-01-29 16:06:47 +01:00
drmortalwombat 60165a7fc3 Add "*" symbol for current address in inline assembler 2022-01-29 13:33:57 +01:00
drmortalwombat 2d41edfc97 Fix byte limit in #embed 2022-01-28 14:13:49 +01:00
drmortalwombat aee284c1d6 Add irq autocrawler sample 2022-01-28 08:49:21 +01:00
drmortalwombat dfe3d71f85 Make shore memcpy calls intrinsic 2022-01-27 23:08:57 +01:00
drmortalwombat 79a841a422 Mark vic registers as volatile 2022-01-27 16:38:47 +01:00
drmortalwombat 5c8b1c6daf Add __export, __native and __interrupt storage class specifiers 2022-01-26 21:48:19 +01:00
drmortalwombat f25bf80a0f Fix LF line ending on windows, float and loop optimizations 2022-01-25 14:31:36 +01:00
drmortalwombat 9f41a55a18 Fix static declaration in header files 2022-01-23 21:14:30 +01:00
drmortalwombat ca93f107c3 Add relocated sections 2022-01-22 18:21:52 +01:00
drmortalwombat 5bda8a4d01 Fix scale in sid.h 2022-01-22 15:07:55 +01:00
drmortalwombat 9dd493d20b Add sid and easyflash includes 2022-01-22 11:16:59 +01:00
drmortalwombat fad67d18aa Add auto loop unrolling and binary (verbatim) format linking 2022-01-21 21:52:16 +01:00
drmortalwombat cc927d778f Improve C const declaration compatibility 2022-01-21 14:42:49 +01:00
drmortalwombat de920f2418 Optimize global variable usage 2022-01-14 17:53:30 +01:00
drmortalwombat c72ca3547b Fix longjump and kernalio end of file handling 2022-01-13 10:37:44 +01:00
drmortalwombat 180e2598b8 Fix multicolor flood fill if target color is back color 2022-01-12 08:55:23 +01:00
drmortalwombat ed37f360eb New multicolor bitmap library 2022-01-11 18:27:13 +01:00
drmortalwombat 55affa4de9 Add auto inline of functions that trivially compute to a constat with constant arguments 2022-01-10 20:05:51 +01:00
drmortalwombat 68f8628409 Optimize size of generated byte code 2022-01-09 19:00:02 +01:00
drmortalwombat 640007546f Add __assume builtin function 2022-01-08 15:51:17 +01:00
drmortalwombat 085fba137f optimize aligned address arithmetic 2022-01-06 16:26:19 +01:00
drmortalwombat a86a19fc8c Add raw mode for charwin 2022-01-04 15:38:06 +01:00
drmortalwombat 639a33f9eb Simple loop invariant optimization for native code 2022-01-04 14:07:56 +01:00
drmortalwombat 2d0f20cadc Added comments to source samples 2022-01-01 12:39:54 +01:00
drmortalwombat b9a1689dc6 Add some library documentation 2021-12-31 18:57:54 +01:00
drmortalwombat 7e66836e07 More samples 2021-12-30 15:41:06 +01:00
drmortalwombat 1fcc39acd5 Add sprite multiplexer 2021-12-29 20:07:13 +01:00
drmortalwombat 80fea25916 More samples 2021-12-28 13:13:05 +01:00
drmortalwombat a1db507816 Add sample for opening border 2021-12-25 15:24:49 +01:00
drmortalwombat 24cc6e20c8 Fix compiler getting stuck on optimizing infinite loop 2021-12-25 12:30:24 +01:00
drmortalwombat 720e532d22 Added scanf and sscanf to stdio 2021-12-24 14:39:03 +01:00
drmortalwombat 0dd6a0655c Optimize call to 8 by16 mul 2021-12-23 20:27:45 +01:00
drmortalwombat 99f674c866 Add gfx libraries 2021-12-23 14:39:04 +01:00
drmortalwombat 893b6f2294 Optimize long divide for short divisor 2021-12-19 22:18:05 +01:00
drmortalwombat 4a9c662cc9 Optimize float native code size 2021-12-19 16:53:12 +01:00
drmortalwombat 6d716b9478 Optimize 32bit shifts 2021-12-18 22:21:39 +01:00
drmortalwombat 381a70839d Fix dynamic code generator library 2021-12-13 22:23:54 +01:00
drmortalwombat f7a5c94229 Optimize frame enter/leave code in native compiler 2021-12-11 12:52:35 +01:00
drmortalwombat 18ab7ce079 Fix broken left shift optimization due to branch in basic block 2021-12-06 22:56:03 +01:00
drmortalwombat a8acde291b Fixed charwin petscii screen code conversion 2021-12-06 09:41:25 +01:00
drmortalwombat 15c65f69aa Change runtime assembler generator use value and return instead of reference 2021-11-29 18:37:15 +01:00
drmortalwombat a6fa114a5b Add runtime assembler functions to c64 library 2021-11-29 17:43:03 +01:00
drmortalwombat ea2b59e64d Fix sprite index in vic.c 2021-11-28 15:17:39 +01:00
drmortalwombat 0ca6ef8894 Some bytecode optimizations 2021-11-26 22:59:10 +01:00
drmortalwombat ccd6a50043 Optimize byte code interpreter loop 2021-11-25 21:42:06 +01:00
drmortalwombat 93174c8e68 Add overflow and underflow checking for floats 2021-11-24 20:01:08 +01:00
drmortalwombat 12aa385e38 Optimize bytecode generator 2021-11-22 19:49:02 +01:00
drmortalwombat 6007553d03 Byte code optimizations 2021-11-21 22:53:06 +01:00
drmortalwombat 4af2bc0bb2 Add setjmp and longjmp 2021-11-20 20:25:53 +01:00
drmortalwombat f2dc0091a8 At get to charwin 2021-11-19 08:13:36 +01:00
drmortalwombat b7aaf52f6a Fix empty cwin_fill_rect 2021-11-18 22:51:00 +01:00
drmortalwombat 4017cc386b Add charwin library and matching code generator optimizations 2021-11-18 14:57:43 +01:00
drmortalwombat 5c66e11ca0 Fold iny into interpreter loop for byte code 2021-11-16 20:24:51 +01:00
drmortalwombat 92b2c34293 Byte code size optimizations 2021-11-16 12:59:16 +01:00
drmortalwombat 0c3e19741c Optimize byte code size 2021-11-16 09:10:39 +01:00
drmortalwombat a65d65d3d1 Add volatile to vic.h raster register 2021-11-08 13:41:00 +01:00
drmortalwombat a8ed15d67b Optimize inline pointer parameters 2021-11-05 08:46:59 +01:00
drmortalwombat fe155d40d4 Change word to use int as base 2021-11-04 10:55:37 +01:00
drmortalwombat a3d8c94620 Push XY register usage in shift to later optimization stage 2021-11-03 19:39:28 +01:00
drmortalwombat bfd9522349 Fix conio.c gotoxy 2021-11-03 12:39:24 +01:00
drmortalwombat dcbd51e75e Fix old asm in conio.c 2021-11-02 14:59:05 +01:00
drmortalwombat f16edb1c57 Optimize signed byte comparisons 2021-11-01 22:33:02 +01:00
drmortalwombat 40f82ba6ec Fix byte table access 2021-11-01 21:22:02 +01:00
drmortalwombat 135d357dbc Strcpy as intrinsic 2021-10-31 19:14:07 +01:00
drmortalwombat 640477f88d Add peephole size optimizations 2021-10-30 10:42:41 +02:00
drmortalwombat e057e24918 Added stddef.h 2021-10-23 16:51:27 +02:00
drmortalwombat 55b79ecfce Fix struct scoping 2021-10-23 11:56:30 +02:00
drmortalwombat 33433403b1 Fix optimizer errors 2021-10-23 00:33:09 +02:00
drmortalwombat 00c59ce6a4 Fix native code function pointer 2021-10-21 10:24:21 +02:00
drmortalwombat 7927df6d41 Fix call/return 2021-10-20 23:03:37 +02:00
drmortalwombat 9833656fcf More cartridge hacking 2021-10-19 22:29:23 +02:00
drmortalwombat 6444428489 Prepare cartdridge linking 2021-10-19 09:36:30 +02:00
drmortalwombat 3520d2a2bd Fix bugs found by llvm lint 2021-10-17 10:40:33 +02:00
drmortalwombat 3c891fb61e Fix 16 bit pointer offsets in native code 2021-10-13 22:19:27 +02:00
drmortalwombat 5372d49b50 Petscii translation in stdio and conio 2021-10-12 17:54:10 +02:00
drmortalwombat da57ae00c5 Add vic include file 2021-10-11 22:14:19 +02:00
drmortalwombat 11af372509 More autoinline optimizations 2021-10-10 17:14:12 +02:00
drmortalwombat 5e02e48c5a Optimized signed byte code compare 2021-10-09 10:38:25 +02:00
drmortalwombat 210b037dbc Remove sign extended byte loads from byte code 2021-10-08 23:04:27 +02:00
drmortalwombat 32b715382c Add fascall for byte code 2021-10-08 17:41:11 +02:00
drmortalwombat 60489bb79e Refactor inter instrction operator handling 2021-10-08 09:07:01 +02:00
drmortalwombat e7231e27e0 Prepare fastcall 2021-10-07 15:14:23 +02:00
drmortalwombat 15743d3115 Refactor temp handling in inter code 2021-10-06 17:30:41 +02:00
drmortalwombat 330e022a43 Exclude bss segment from prg file 2021-10-05 18:24:03 +02:00
drmortalwombat 542cb66693 Fixes to get dhrystone.c to compile and run 2021-10-03 20:35:50 +02:00
drmortalwombat 30becb541e Add long integer support in native and byte code 2021-10-02 17:22:18 +02:00
drmortalwombat 3d9302c90c Support for long integer with byte code 2021-10-02 10:06:13 +02:00
drmortalwombat e713dc5940 Direct embedding of inline assembler in native code 2021-09-28 18:35:23 +02:00
drmortalwombat 1dd63ac708 Fix byte size inc/dec error 2021-09-25 22:50:16 +02:00
drmortalwombat 8e9b0fe54c Add simple native loop optimisation 2021-09-25 21:57:33 +02:00
drmortalwombat f925833884 Move executable into bin folder for windows and linux 2021-09-25 18:20:32 +02:00
drmortalwombat 5c3ff47690 Indirect address, y optimisation for short loops 2021-09-23 17:14:02 +02:00
drmortalwombat 123da8c155 Add charmap pragma 2021-09-23 08:26:46 +02:00
drmortalwombat 4ca77ba41a Byte operand sizes fixes and optimizations 2021-09-22 22:49:52 +02:00
drmortalwombat 603b62b9d3 Optimize native comparison against zero 2021-09-21 22:44:00 +02:00
drmortalwombat eebc39e53a Fix return type coercion, region based linker 2021-09-21 20:44:19 +02:00
drmortalwombat 3f5f3ee7ea Filenames now full 2021-09-21 15:08:05 +02:00
drmortalwombat 27d7baaac2 Using linker objects and sections 2021-09-20 22:36:16 +02:00
drmortalwombat d3d20bee26 Prepare section based linker 2021-09-19 22:22:16 +02:00
drmortalwombat 10bb751449 Fix struct over header boundaries 2021-09-19 20:00:36 +02:00
drmortalwombat fae377132f Fix assembler label low/high byte immediate 2021-09-19 16:08:38 +02:00
drmortalwombat 37828f2baf More byte and long preparations 2021-09-14 21:38:24 +02:00
drmortalwombat e2e20581a6 Prepare byte level optimisations 2021-09-14 16:34:48 +02:00
drmortalwombat 9f8362255f add conio.h 2021-09-13 20:55:31 +02:00
drmortalwombat 913f0d4190 Change line end to 13 in prints 2021-09-13 20:09:18 +02:00
drmortalwombat 87ccd5e221 More autotest 2021-09-12 16:05:23 +02:00