File | Date | Author | Commit |
---|---|---|---|
core | 2013-09-17 |
![]() |
[e38aaa] tested on NetBSD-6.1.1-amd64 |
js | 2013-09-11 |
![]() |
[6bcaf8] changed js sim to use the new format |
native | 2013-09-17 |
![]() |
[e38aaa] tested on NetBSD-6.1.1-amd64 |
samples | 2013-09-17 |
![]() |
[6d89be] device 'simple' made minimalistic and renamed t... |
tools | 2013-09-15 |
![]() |
[a5db1c] JBIT_PATH; xv65: random, trace, putuint8, trail... |
.gitignore | 2013-09-17 |
![]() |
[44e73b] rule 'pack' moved to cc65 |
LICENSE | 2012-08-26 |
![]() |
[59e691] first commit |
README.md | 2013-09-12 |
![]() |
[9d2f1b] fixed typo |
This is a C++/JavaScript version of the JBit Virtual Machine. It has a
core written in C++, and two simulators using it: a native one using
it directly, and a JavaScript one using it via
emscripten.
JBit is a 6502 simulator and development environment. It targets feature
phones, but this version, targeting desktops and browsers is also
available. You can see an old version of this code running here
(browse the gallery and click on sim to run the sample on your browser
and jb to download it to run it on the native simulator):
To compile the native version of the simulator, beside the usual gcc/g++
toolchain, you need the development versions of ncurses. On debian, this
means having the libncurses5-dev package installed.
The following should work (tested on debian stable):
cd native
make
The simulator is self-contained and does not required an installation;
just copy the executable wherever you want.
To run the simulator, type something like this:
jbit charset.jb
For the charset example, press 2 and 8 to scroll and 0 to halt the
program (you then have to press : or Ctrl+C to end the simulator).
If you want to try writing your own programs, get my fork of
cc65 here:
https://github.com/efornara/cc65
The native version of the simulator includes a device (xv65) that offers
a simplified version of the underlying machine. It is inspired by the
beautiful xv6.
To compile the javascript version of the simulator, you need
emscripten. Once you have
checked that your emscripten installation works, generate js/core.js by
typing:
cd core
make
You can then try out the simulator by copying the js directory into a
web server.
http://jbit.sf.net (XHTML site, optimized for feature phones)
or
http://jbit.sf.net/m (WAP site, for old phones / very low bandwidth)