Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

65C02 emulation #99

Open
jedeoric opened this issue Aug 26, 2017 · 1 comment
Open

65C02 emulation #99

jedeoric opened this issue Aug 26, 2017 · 1 comment

Comments

@jedeoric
Copy link
Collaborator

Hello, i would like to add 65C02 emulation in oricutron (WDC version).

Anyway, what is the best way to code ? I started something but i prefer to ask before i finished it.

I did like this :
in 6502 struct, i added :
SDL_bool wdccmosversion;

Line 1943 of 6502.c, i did this (i added also cycles to this new opcode.

case 0xFA:  // PLX
	if (cpu->wdccmosversion)
	{
		cpu->x = POPB;
		FLAG_ZN(cpu->x);
		break;
            }

if you think, that it's not the best way let me know, but it's easier than switching to C++ to inherit object, or to duplicate 6502 emulation in order to manage 2 files.

Let me know !

@polluks
Copy link
Collaborator

polluks commented Aug 27, 2017

You may look at cc65's sim65, we use two opcode tables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants