-
Notifications
You must be signed in to change notification settings - Fork 32
targets clcd
For some story line: http://cubed-borka.blogspot.hu/2016/05/my-commodore-65-and-commodore-lcd.html
Commodore LCD is a highly unknown portable LCD based device with battery power and ability to "sleep" with SRAMs still powered. Unfortunately the project was stopped before the production phase, only about 2-5 units known to exist in different state of development. Compared to the LCD, Commodore 65 is a highly known, well documented, easy to get and wide-spread machine :)
I spent lot of work to get know the basic (then detailed) information on this nice machine, enough, to be able to write an emulator. Initially not even the basic facts were available (what kind of CPU, clock frequency, etc). I've managed to get enough information (from disassembly of the available ROM images, debugging my emulator, and some cases by asking ex-Commodore ex-engineers). The result was a specification and a JavaScript based emulator.
It was some years ago, and though a native emulator is developed (not made as a public release) it was buggy, it used quite questionable SDL screen "updating" solution etc. Now it's a fresh start, with reusing the CPU and VIA emulation parts only. This piece of code is about writing a native emulator version which can be run at least on Windows and Linux (or Unix-like machines, Raspberry PI is included) with the help of the SDL2 library. Note, that in theory, it would be easy to port to other targets because of using SDL. As I wanted to emulate other machines as well, I renamed the project from XCLCD (CLCD = Commodore LCD) to "X-Emu" or X-Emulators, without too much idea what "X" should mean ...
Currently no data storage is implemented ... You basically have only two hot-keys defined, press F9
to exit, or F11
to toggle between windowed and full screen mode. That's all.
Otherwise, you should be able to use your keyboard to "type" as it would be the keyboard of the real machine. However, please note: keyboard layout is SDL scancode based! That is, maybe it's nothing about the letters on your PC keyboard :) especially if you use some national (and not US) keyboard layout. As there are tons of layouts out there, it would be hard to do otherwise ... Though symblic mapping can be a solution, but shift difference (ie, a key is shifted on PC, but not on the emulated machine or vice versa) would cause problems. The only exception here is Commodore VIC-20 shifted cursors. It should work without shift too (with the four cursor keys), however exactly because the emulated shift, it's possible that shift is not detected, as it's only "pressed" virtually at the same time as the key itself.