Page 1 of 3

shadowVIC – a lightweight VIC-20 emulator

Posted: Tue Sep 29, 2015 6:52 am
by pixel
Well, here's my early Christmas present for you:

https://github.com/SvenMichaelKlose/shadowvic

Currently Pulse and Arukanoido are run on a Raspberry Pi Model 1 with it to entertain people in public places.

It's out to help you port your games to low-power devices or to just port your game cores to retain the original feeling and upgrade them with better sound and graphics via illegal opcodes that would usually jam the CPU. The license should suit any business intentions. How about your cool VIC games on Android or iphone or just as a Linux, DOS or Windows binary?

I slapped in BASIC which hangs due to missing keyboard emulation(?). And that's were you could start to help out. How do I get this to run without emulating the keyboard in the first place? :(

love + respect
pixel

Re: shadowVIC – a lightweight VIC-20 emulator

Posted: Tue Sep 29, 2015 9:42 am
by pixel
Added Pulse, so you can convince yourself of the emulator's functionality. A joystick is required. ;)

Re: shadowVIC – a lightweight VIC-20 emulator

Posted: Tue Sep 29, 2015 11:53 am
by majikeyric
Nice Christmas gift! :D Thank you!

It's very interesting. Unfortunately I'm not a linux user but I'll look inside.

Re: shadowVIC – a lightweight VIC-20 emulator

Posted: Tue Sep 29, 2015 7:55 pm
by pixel
Switched from shell script to GNU autotools for building and installing. Tweaking the Makefile.am files is very easy if you want to try out your own code. (I'm wondering how many people here use a Unix.)

Re: shadowVIC – a lightweight VIC-20 emulator

Posted: Tue Sep 29, 2015 9:21 pm
by pixel
This was too easy. Installs shared and static libraries, headers and binaries like it's supposed to do. Ready for the wild.

Please pull updates regularly as the interface is probably about to change a bit within the next couple of days because I have to adapt the arcade tube stuff now.

Re: shadowVIC – a lightweight VIC-20 emulator

Posted: Wed Sep 30, 2015 2:02 am
by nippur72

Re: shadowVIC – a lightweight VIC-20 emulator

Posted: Wed Sep 30, 2015 7:56 am
by pixel
nippur72 wrote:added to VIC 20 Emulators list
Awesome! Thanks! I hope I'll get some help porting this to other platforms, especially mobiles.

Re: shadowVIC – a lightweight VIC-20 emulator

Posted: Thu Oct 01, 2015 1:09 pm
by pixel
GNU autotools gives me crap code that doesn't work on the Raspberry Pi Model 1 in matters of speed. Now I'm back to shell scripts to concatenate all source files into one to feed gcc in one go, because link–time optimization doesn't do the job as expected.

Re: shadowVIC – a lightweight VIC-20 emulator

Posted: Thu Oct 08, 2015 6:56 am
by pixel
BCD arithmetics just went in as well as zero page wrap–arounds.

But now for the bummer: somehow I missed out about LDX/STX zeropage,Y.

m)

Hope that'll get BASIC to boot...

Re: shadowVIC – a lightweight VIC-20 emulator

Posted: Thu Oct 08, 2015 11:47 am
by pixel
The missing LDX/STX zeropage,Y is now there.

BASIC gets stuck while… well… it seems to try to print the number of free bytes as a float!?!? :o …and gets stuck in an endless loop.

Re: shadowVIC – a lightweight VIC-20 emulator

Posted: Thu Oct 08, 2015 7:21 pm
by pixel
I have compared the 6502 emulation of this thing to lots of other emulators, googled a lot to make sure, fixed interrupt processing, BRK, BIT, made everything more readable, hacked in stack dumps, etc. Now the main 6502 emulator is ~470 lines of very, very simple code.

And it still doesn't do the floating point thing to boot BASIC.

But I know here're people on Denial who could read it like others would read a comic and point out the last bugs in it within a handful of minutes…

Please help out… BASIC apps won't need cycle exact emulation.

Re: shadowVIC – a lightweight VIC-20 emulator

Posted: Fri Oct 09, 2015 2:55 am
by nippur72
What I suggest, is to add unit testing to your CPU emulation.

Something simple like this:

Code: Select all

execute(169,1);  // lda #$01
assert(cpu.a == 1);

Re: shadowVIC – a lightweight VIC-20 emulator

Posted: Fri Oct 09, 2015 3:46 am
by pixel
nippur72 wrote:What I suggest, is to add unit testing to your CPU emulation.

Something simple like this:

Code: Select all

execute(169,1);  // lda #$01
assert(cpu.a == 1);
Hoped to get around that as I'm too lazy. ;) There's already an escape code for testing registers.

Re: shadowVIC – a lightweight VIC-20 emulator

Posted: Fri Oct 09, 2015 4:49 am
by pixel
Found a bunch of tests I wrote in the beginning and included them as an example application. It detected a mistake made yesterday. Am out of wits.

Re: shadowVIC – a lightweight VIC-20 emulator

Posted: Mon Oct 26, 2015 10:38 am
by pixel
I know you're not hacking away with your games on shadowVIC to become a phone app millionaire, because you haven't complained about the missing debugger. :mrgreen:

That's fixed a little bit. As soon as you hit Ctrl+c a most basic debugger will welcome you. Enter 'h' to get help or hit Ctrl+d to leave it.

BTW the package installs "picovic", which still cannot boot BASIC :(, and the game "pulse".