Comments (6)
In his talk I believe @lefticus mentions that the leftover registers are assigned some fixed addresses in the zero page which the 6502 will access faster than other RAM.
from 6502-cpp.
Oh, right. But how can we be sure that the program doesn't use it?
from 6502-cpp.
That is correct. I use zero page mapping of x86 registers. The mapping is here: https://github.com/lefticus/x86-to-6502/blob/master/src/main.cpp#L75-L92
I'm relying on two things specifically
- I'm targeting the C64, so I know that the ROM/hardware isn't using those locations: http://sta.c64.org/cbm64mem.html
- I'm assuming that the entire program executing is the one that was translated from x86
from 6502-cpp.
Ok, thank.
from 6502-cpp.
How best to implement alternative zero-page mappings? Implement get_register
as a function pointer and write multiple implementations? Make new C64
and A2
classes that inherit from a the base 6502
class and implement their own get_register
methods?
I'm specifically thinking of targeting Apple II.
http://apple2.org.za/gswv/a2zine/faqs/csa2pfaq.html#017
from 6502-cpp.
Since this is just a huge experiment anyhow and I have no idea what would be the best answer in the long run - I say go with the function pointer (or std::function, or template Callable thing?) and we'll see how it ends up working out.
from 6502-cpp.
Related Issues (8)
- Feature Request: 6510 Unintended OpCodes HOT 10
- Optimizing Java Byte Code
- Misleading error messages HOT 2
- Feature request: calling disassembler and assembler for the user HOT 2
- Any idea if this re-assembler idea can be used with Z80 instead of 6502 HOT 1
- converting from z80 would be great as well
- Large refactor and added features
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 6502-cpp.