1
0
mirror of https://github.com/lefticus/6502-cpp.git synced 2024-12-30 07:31:38 +00:00
Commit Graph

74 Commits

Author SHA1 Message Date
Jason Turner
434a61fe46 Add more test cases 2021-05-19 19:45:23 -06:00
Jason Turner
340c286b74 Use test templates to multiply out the versions I want 2021-05-19 15:44:27 -06:00
Jason Turner
49d68fe54c Add NOP support and allow for unused symbols 2021-05-19 15:18:44 -06:00
Jason Turner
f64fa3cce6 Start adding tests 2021-05-19 14:28:05 -06:00
Jason Turner
681e35ba5f fix complement opcode translation 2021-05-17 13:58:50 -06:00
Jason Turner
e2b2601705 Re-enable optimizations 2021-05-17 13:54:55 -06:00
Jason Turner
c6a1a31533 Fix cpse instruction implementation from bit to cmp 2021-05-17 13:23:31 -06:00
Jason Turner
ac8895120f Add icall, inc, and fix up some assembly parsing 2021-05-17 13:17:26 -06:00
Jason Turner
e7a3db9dda Fix up some optimizer passes 2021-05-13 23:35:57 -06:00
Jason Turner
28ebf888e3 Start adding command line options, and some formatting fixes 2021-05-13 22:23:25 -06:00
Jason Turner
4cbdae3ffe Fix handling of 16 bit C,N,Z flags 2021-05-12 09:38:18 -06:00
Jason Turner
a6f012878e Add 'call' instruction 2021-05-12 07:51:58 -06:00
Jason Turner
905e850abb Try to get carry/zero/N flags set properly for various branch states 2021-05-11 22:00:33 -06:00
Jason Turner
6c0e5a660d Add ror instruction 2021-05-11 20:44:38 -06:00
Jason Turner
9e44438f1e
Delete README.md 2021-05-11 10:43:39 -06:00
Jason Turner
47d4ce2342
Merge pull request #10 from lefticus/move_to_avr
Move to avr
2021-05-11 10:41:30 -06:00
Jason Turner
a1c596622b Disable a fixup, which might not be necessary now 2021-05-11 09:18:03 -06:00
Jason Turner
eedec41b1e Fix handling of sbc/sub and enable parsing of -fverbose-asm 2021-05-09 17:31:44 -06:00
Jason Turner
9fe26641b7 Add additional example 2021-05-09 08:39:55 -06:00
Jason Turner
a4edf7194e Better stack handling. We now require -mtiny-stack from GCC 2021-05-08 22:59:35 -06:00
Jason Turner
baf9c092ea Add some (broken) stack handling. Need to move to -mtiny-stack 2021-05-08 21:15:21 -06:00
Jason Turner
d2241528e5 Implement a bunch more instructions 2021-05-08 17:58:14 -06:00
Jason Turner
f79a189a12 Fix lookup of X,Y,Z registers 2021-05-08 16:01:25 -06:00
Jason Turner
e6040763eb Some code organization and splitting up 2021-05-06 23:11:12 -06:00
Jason Turner
afcbe05bff Some reorg and start to move to ctre 2021-05-06 21:43:03 -06:00
Jason Turner
3f9fd79586 Start to cleanup layout and code 2021-05-06 17:50:36 -06:00
Jason Turner
7a5926b5fd Move start address and make c64 auto-startable 2021-05-06 16:49:33 -06:00
Jason Turner
f0caf81299 Remove i386 which was lagging very far behind now 2021-05-06 14:12:16 -06:00
Jason Turner
4ffae19177 change name to 6502-c++ and merge in files from cpp_starter_project 2021-05-06 14:04:59 -06:00
Jason Turner
21d23dfcb9 Add a new compile script 2021-05-06 11:39:33 -06:00
Jason Turner
f95290b68c Apply a few more optimization rounds 2021-05-05 20:21:06 -06:00
Jason Turner
d39ad32438 convert sec/sbc with cmp, increase perf 2021-05-05 17:02:38 -06:00
Jason Turner
ab9dd4e1b7 Updated 16bit counter example with higher level functions 2021-05-05 16:44:30 -06:00
Jason Turner
77c25389aa 16 bit counter example working 2021-05-05 15:56:08 -06:00
Jason Turner
1547abccab Apply some clang-format action 2021-05-04 23:31:39 -06:00
Jason Turner
14b3f4192e Fix several CPU bugs and add several more instructions 2021-05-04 23:29:48 -06:00
Jason Turner
b0980ac10a More multi-byte operations working 2021-05-03 09:57:49 -06:00
Jason Turner
51c5767f0e Ability to copy from .data section resources to RAM 2021-05-02 18:10:12 -06:00
Jason Turner
ad75dcdfef Fix which bit is tested with the sbrs instruction 2021-04-22 20:44:44 -06:00
Jason Turner
24012c1ff7 Fix use of address 1 to literal 1 for skip instructions
Thank you to the viewers who pointed out the issue at the
end of the stream.

At this point, simple code works, but the conditional
from the joystick input does not seem to work yet.

 * also add location header for linker
 * also filter errors and directives better
2021-04-22 18:54:00 -06:00
Jason Turner
5591249f2a Almost working programs with AVR conversion
* need to add a decent header address
 * probably need to fix sbrc and sbrs
2021-04-22 15:52:35 -06:00
Jason Turner
13af1e8cca Get AVR code starting to work, make debuggable 2021-04-22 10:42:21 -06:00
Jason Turner
2a2ce54d32 add jst 2021-04-18 16:50:56 -06:00
Jason Turner
ba5fa6c978 Merge pull request #7 from aeon-dev/fix_osx_build
Fix build on OSX by telling CMake we require C++14
2017-07-29 16:05:25 -06:00
Robin Degen
9c9e6bf7ed Fix build on OSX by telling CMake we require C++14, which is not enabled by default. 2017-07-04 17:02:43 +02:00
Jason Turner
da8dcfe213 Merge branch 'master' of github.com:lefticus/x86-to-6502 2016-10-26 15:35:08 -06:00
Jason Turner
717b79f32f Merge pull request #2 from dr-m/master
Initialize the Pong sprite data at compilation time, and adjust the translation.
2016-10-26 15:34:30 -06:00
Jason Turner
36ad50fa32 Make copy of original pong template based version 2016-10-26 15:33:57 -06:00
Marko Mäkelä
617e11244e Move the sprite declarations to the main() function.
This change does not affect the generated code, other than the
assembler labels for the data. The data will still be initialized
at compilation time.
2016-10-09 21:05:01 +03:00
Marko Mäkelä
ee36c4c08f Define a constexpr VIC_II::Sprite constructor.
write_multi_color_line(), write_line(): Remove.

VIC_II::SpriteLine<bool multicolor>: A line of sprite bitmap data.
The constructor converts one line of data at a time.

VIC_II::Sprite<bool multicolor>: An array of SpriteLine.

This change does not affect the generated binary code.
In the assembler code generated by clang++-4.0, the binary data
will be formatted in groups of 3 bytes instead of 3*21 bytes.
2016-10-09 21:03:28 +03:00