Jump to content
IGNORED

Any 6502 emulator library in C


ilmenit

Recommended Posts

I don't know of any library, but here's a suggestion if youc an't find one.

 

One trick I learned to get around zillions of obscure macros was to intercept the output of the parsing before it is sent to the compilation backend. Most compilers have a switch that allows this. You wind up with the source code after .h file processing, macro expansion and subsitutuion is done. Still not perfect, but can be a lot more readable.

Link to comment
Share on other sites

Write you own?

6502 is amazingly simple, doing an emulator would probably be something you'd knock over in a few hours.

 

I respect my time and reinventing the wheel is nothing I want. A few hours? With debugging and making sure that emulation is 100% correct? I'd say a few days.

Link to comment
Share on other sites

Is there any 6502 emulation library written in C with available sources that allows execution of single instruction?

 

What about this one: http://raster.infos.cz/atari/sa_libraries/sa_libraries.htm

AFAIK it is based on the Atari800 code.

 

Edit:

Since the "readme" seems missing there, here the contents:

 

========================================================================

DYNAMIC LINK LIBRARY: sa_6502.dll license: GPL

Standalone CPU 6502 emulation library, by C.P.U. 2003

========================================================================

 

This is the library created from the CPU 6502 emulator. Code was taken

from Atari800 emulator 1.2.4 (http://atari800.sourceforge.net) and was

stripped down for instructions execution only and lacks a lot of the

original functionality (IRQ, NMI, etc.).

 

It provides this functions:

 

void C6502_Initialise(BYTE* memory );

int C6502_JSR(WORD* adr, BYTE* areg, BYTE* xreg, BYTE* yreg, int* maxcycles);

void C6502_About(char** name, char** author, char** description );

 

Note:

 

Full source codes are in the "src" directory.

Edited by Irgendwer
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...