3 ms·
Oh my, the 6502 emulation [1] has fewer lines of assembly code than my (code-generated) implementation has lines of C code [2] :D Very nice use of a macro asse
by flohofwoe 4y ago
Oh my, the 6502 emulation [1] has fewer lines of assembly code than my (code-generated) implementation has lines of C code [2] :D
Very nice use of a macro assembler though [3], makes the code feel very high level.
To my defense, my generated code has a lot of redundancies (such as assert(false) which were meant to catch any 'stray cycles' but which are removed in release mode - and it could be more compact if it would use preprocessor macros (but since the code is generated anyway that seemed kinda wrong).
[1] https://github.com/zajo/appler/blob/develop/src/65C02.ASM https://github.com/zajo/appler/blob/develop/src/65C02.ASM
[2] https://github.com/floooh/chips/blob/master/chips/m6502.h https://github.com/floooh/chips/blob/master/chips/m6502.h
[3] https://github.com/zajo/appler/blob/52aaa0f768cdf303438cd2c7b6236c0fadf5ba96/src/65C02.ASM#L227-L246 https://github.com/zajo/appler/blob/52aaa0f768cdf303438cd2c7...
- hvs 4y agoYour code has been super helpful while I've been trying to build a cycle-accurate 6502 emulator as well. I'm also planning on using your header files in another emulator project I'm working on. Thanks for a building an awesome set of emulators.
- wiz21c 4y agoDon't be sad, your code is pretty helpful! I use it with great success in my AccuraApple emulator :-) Thanks for giving it away, it helped me to boostrap my project much easier !