shadowVIC – a lightweight VIC-20 emulator

You need an actual VIC.

Moderator: Moderators

User avatar
pixel
Vic 20 Nerd
Posts: 868
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/pixel/
Location: various
Occupation: Pan–galactic shaman

shadowVIC – a lightweight VIC-20 emulator

Postby pixel » Tue Sep 29, 2015 6:52 am

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
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose

User avatar
pixel
Vic 20 Nerd
Posts: 868
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/pixel/
Location: various
Occupation: Pan–galactic shaman

Re: shadowVIC – a lightweight VIC-20 emulator

Postby pixel » Tue Sep 29, 2015 9:42 am

Added Pulse, so you can convince yourself of the emulator's functionality. A joystick is required. ;)
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose

User avatar
majikeyric
Vic 20 Devotee
Posts: 239
Joined: Fri Oct 24, 2014 2:08 pm
Website: http://majikeyric.free.fr
Location: France

Re: shadowVIC – a lightweight VIC-20 emulator

Postby majikeyric » Tue Sep 29, 2015 11:53 am

Nice Christmas gift! :D Thank you!

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

User avatar
pixel
Vic 20 Nerd
Posts: 868
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/pixel/
Location: various
Occupation: Pan–galactic shaman

Re: shadowVIC – a lightweight VIC-20 emulator

Postby pixel » Tue Sep 29, 2015 7:55 pm

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.)
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose

User avatar
pixel
Vic 20 Nerd
Posts: 868
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/pixel/
Location: various
Occupation: Pan–galactic shaman

Re: shadowVIC – a lightweight VIC-20 emulator

Postby pixel » Tue Sep 29, 2015 9:21 pm

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.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose

User avatar
nippur72
de Lagash
Posts: 405
Joined: Thu Sep 07, 2006 8:35 am

Re: shadowVIC – a lightweight VIC-20 emulator

Postby nippur72 » Wed Sep 30, 2015 2:02 am


User avatar
pixel
Vic 20 Nerd
Posts: 868
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/pixel/
Location: various
Occupation: Pan–galactic shaman

Re: shadowVIC – a lightweight VIC-20 emulator

Postby pixel » Wed Sep 30, 2015 7:56 am

nippur72 wrote:added to VIC 20 Emulators list

Awesome! Thanks! I hope I'll get some help porting this to other platforms, especially mobiles.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose

User avatar
pixel
Vic 20 Nerd
Posts: 868
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/pixel/
Location: various
Occupation: Pan–galactic shaman

Re: shadowVIC – a lightweight VIC-20 emulator

Postby pixel » Thu Oct 01, 2015 1:09 pm

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.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose

User avatar
pixel
Vic 20 Nerd
Posts: 868
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/pixel/
Location: various
Occupation: Pan–galactic shaman

Re: shadowVIC – a lightweight VIC-20 emulator

Postby pixel » Thu Oct 08, 2015 6:56 am

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...
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose

User avatar
pixel
Vic 20 Nerd
Posts: 868
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/pixel/
Location: various
Occupation: Pan–galactic shaman

Re: shadowVIC – a lightweight VIC-20 emulator

Postby pixel » Thu Oct 08, 2015 11:47 am

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.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose

User avatar
pixel
Vic 20 Nerd
Posts: 868
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/pixel/
Location: various
Occupation: Pan–galactic shaman

Re: shadowVIC – a lightweight VIC-20 emulator

Postby pixel » Thu Oct 08, 2015 7:21 pm

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.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose

User avatar
nippur72
de Lagash
Posts: 405
Joined: Thu Sep 07, 2006 8:35 am

Re: shadowVIC – a lightweight VIC-20 emulator

Postby nippur72 » Fri Oct 09, 2015 2:55 am

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);

User avatar
pixel
Vic 20 Nerd
Posts: 868
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/pixel/
Location: various
Occupation: Pan–galactic shaman

Re: shadowVIC – a lightweight VIC-20 emulator

Postby pixel » Fri Oct 09, 2015 3:46 am

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.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose

User avatar
pixel
Vic 20 Nerd
Posts: 868
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/pixel/
Location: various
Occupation: Pan–galactic shaman

Re: shadowVIC – a lightweight VIC-20 emulator

Postby pixel » Fri Oct 09, 2015 4:49 am

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.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose

User avatar
pixel
Vic 20 Nerd
Posts: 868
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/pixel/
Location: various
Occupation: Pan–galactic shaman

Re: shadowVIC – a lightweight VIC-20 emulator

Postby pixel » Mon Oct 26, 2015 10:38 am

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".
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose


Return to “Emulation and Cross Development”

Who is online

Users browsing this forum: No registered users and 1 guest