Linux console-based 6502 emulator anywhere?
Linux console-based 6502 emulator anywhere?
I'm wondering if there are any 6502 emulators that use the Linux console instead of Windows or X11, etc. GUIs. I want to turn an old Pentium 133 into a 6502 development system, but don't want to use X11 to do it. I doubt it exists, but if there is one, I'm all ears.
My lib65816 package is designed to be modular enough to write your own emulators. True, it's designed for the 65816, but if you keep it in emulation mode, it ought to mimick the 6502 very closely, provided you don't use 65C02-specific opcodes.
http://www.falvotech.com/content/lib65816
http://www.falvotech.com/content/lib65816
Re: Linux console-based 6502 emulator anywhere?
daivox wrote:
I'm wondering if there are any 6502 emulators that use the Linux console instead of Windows or X11, etc. GUIs. I want to turn an old Pentium 133 into a 6502 development system, but don't want to use X11 to do it. I doubt it exists, but if there is one, I'm all ears.
Look for "xcbm" on:
http://www.6502.org/users/andre/misc/index.html
André
I'd just like to add a "me too" to this thread. I've started working on my first ever 6502 SBC (keeping it simple, since this is my first full microcomputer design), and I'd love a simulator for doing software debugging.
The existing simulators I've found seem to be Commodore 64 simulators, or Windows-only, or highly non-configurable. Ideally I'd want text-only (or curses based), something that would work on OS X or Linux -- or even Windows, with the right libraries -- where I can adjust the memory map to suit my design, and log memory accesses to certain locations.
I started working on a 6502 system simulator in Java (because it's my strongest compiled language at the moment, and I didn't want to have to dust off my C knowledge), but it just feels like re-inventing the wheel. I'd much rather just enhance someone else's work, rather than create Yet Another 6502 CPU Simulator
The existing simulators I've found seem to be Commodore 64 simulators, or Windows-only, or highly non-configurable. Ideally I'd want text-only (or curses based), something that would work on OS X or Linux -- or even Windows, with the right libraries -- where I can adjust the memory map to suit my design, and log memory accesses to certain locations.
I started working on a 6502 system simulator in Java (because it's my strongest compiled language at the moment, and I didn't want to have to dust off my C knowledge), but it just feels like re-inventing the wheel. I'd much rather just enhance someone else's work, rather than create Yet Another 6502 CPU Simulator
Once again, I maintain a 65816 emulator library, called "lib65816", for the Linux platform. It's 100% independent of any emulator. It stands without documentation because nobody heretofore has demonstrated any interest. However, I'd be happy to help anyone willing to write a simple console emulator using it. I'm unfortunately too busy to write such a virtual machine myself, as I'm working on my Kestrel project.
See http://www.bitbucket.org/kc5tja/lib65816/overview/ for the Mercurial repository. From there, you can also download a .zip or .gz file as well.
Again, this is just the CPU emulation library. You'll still need to write the surrounding emulator; but if all you're interested in is a virtual machine a la qemu or some such, you can use the WDM opcode handler as a kind of "system call" opcode, allowing you to interface to the host OS fairly easily. With that, there's really not even any need for creating virtual peripherals.
Let me know if you have any problems.
See http://www.bitbucket.org/kc5tja/lib65816/overview/ for the Mercurial repository. From there, you can also download a .zip or .gz file as well.
Again, this is just the CPU emulation library. You'll still need to write the surrounding emulator; but if all you're interested in is a virtual machine a la qemu or some such, you can use the WDM opcode handler as a kind of "system call" opcode, allowing you to interface to the host OS fairly easily. With that, there's really not even any need for creating virtual peripherals.
Let me know if you have any problems.
kc5tja wrote:
I maintain a 65816 emulator library, called "lib65816", for the Linux platform.
kc5tja wrote:
That's funny -- my post above was marked as a "new message", even though I was the one who actually posted it. Anyone else seeing anomalous behavior like this?
Daryl
the other lib6502
I highly recommend Ian Piumarta's lib6502: it's console based, has a BBC mode, is readily extensible. Beautiful code, in fact.
http://piumarta.net/software/lib6502/lib6502-1.0
http://piumarta.net/software/lib6502/lib6502-1.0
Re: the other lib6502
BigEd wrote:
I highly recommend Ian Piumarta's lib6502: it's console based, has a BBC mode, is readily extensible. Beautiful code, in fact.
http://piumarta.net/software/lib6502/lib6502-1.0
http://piumarta.net/software/lib6502/lib6502-1.0
I've got some problem compiling it with the microsoft c++ express edition: it compile quite fine (with a couple of cast added) but the bbc emulation wont run.
is there anyway here in the forum with experience with this, before starting debugging
Re: the other lib6502
Does it run the trivial examples from the readme? You don't need the BBC emulation for that.
Could you show us what you see?
I have a couple of patches somewhere but they're not essential.
Could you show us what you see?
I have a couple of patches somewhere but they're not essential.
Re: the other lib6502
BigEd wrote:
Does it run the trivial examples from the readme? You don't need the BBC emulation for that.
Could you show us what you see?
I have a couple of patches somewhere but they're not essential.
Could you show us what you see?
I have a couple of patches somewhere but they're not essential.
i can run fine the examples and not-so-big-problem during compile time, i instert only a couple of cast
Code: Select all
typedef unsigned int uint16_t;
typedef unsigned char uint8_t;
but i cannot run the bbc emulator with os12.rom and the basic rom, no prompt.
i found nice the idea to have a bbc rom operating in the emulator, because it is a simple environment to use for testing 6502 software.
anyway i'm open to receive hints, at the present i'm working on 6502 figforth and i need a place for running it.
tnx!
Code: Select all
typedef unsigned short uint16_t;
kc5tja wrote:
Code: Select all
typedef unsigned short uint16_t;
I've used one platform where char, short, and int were all 16 bit (long was probably 32 bit, but I don't remember, and doubt I used it). And another with 64 bit longs.
But on most platforms that most people will experience today, short=16 and long=32 is reasonably safe.