Just-for-fun Emulator in Java

You need an actual VIC.

Moderator: Moderators

Post Reply
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Just-for-fun Emulator in Java

Post by Kananga »

After finally figuring out how to read the instructions for registration to this forum I am now able to announce my current toy project:
A Vic-20 emulator in Java.

I wrote one in C++ once and it was reasonably fast, but lost the source code. This one was more fun to write and I learned a lot about Java, but it is dead slow.
You will need at least a quad-core at 2.5GHz to run it at reasonable speed.
It is also not ready for using without knowledge of the VIC-20 and in no way competing with very good emulators like VICE.

However, I enjoyed reviving my memory of the good old days in Java code and want to share the fun. Please feel free to have a look.

http://code.google.com/p/vic20emu
User avatar
Kweepa
Vic 20 Scientist
Posts: 1315
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

Cool!
We now have emulators coming out our ears!

Did you see this?
http://www.kweepa.com/step/vic20/jarvic.html
(No debugger)

Steve

EDIT:
Had a poke around the googlecode page. Very interesting! It looks very well structured. And the screenshot is intriguing.
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Post by Kananga »

Nice emulator. And fast too!
I like the TV image and the keyboard-style menu.

I was not aware of Jac64 or forgot about it. Perhaps I can learn from the source how to write a fast emulator in Java.
User avatar
Kweepa
Vic 20 Scientist
Posts: 1315
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

Kananga wrote:I was not aware of Jac64 or forgot about it. Perhaps I can learn from the source how to write a fast emulator in Java.
The basic idea (this is how most emulators get their speed in my experience) is to have a large switch statement to handle the CPU emulation.

For the "GPU", caching and lookup tables.
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Post by Kananga »

Kweepa wrote: The basic idea (this is how most emulators get their speed in my experience) is to have a large switch statement to handle the CPU emulation.
The emulator I wrote in C once used a jumptable with 256 entries, so the switch is not the fastest option, at least without a good compiler. CPU emulation speed is not my main problem, but I suspect the clock emulation/synchronization to be a bottle-neck. VIC emulation is the slowest.
Kweepa wrote:For the "GPU", caching and lookup tables.
Part of the problem is my poor knowledge of graphics in Java. I will have a look at the "GPU" code of Jac64... ;)
rhurst
Omega Star Commander
Posts: 1371
Joined: Thu Jan 31, 2008 2:12 pm
Website: https://robert.hurst-ri.us
Location: Providence, RI
Occupation: Tech & Innovation

Post by rhurst »

Kweepa wrote:We now have emulators coming out our ears!
Yeah, and propellers spinning on the top of both your heads, too! :P
Any technology distinguishable from magic is insufficiently advanced.
https://robert.hurst-ri.us/rob/retrocomputing
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Post by Kananga »

rhurst wrote:
Kweepa wrote:We now have emulators coming out our ears!
Yeah, and propellers spinning on the top of both your heads, too! :P
Propellerheads, wohoo! Now it's three ;)
Image
Post Reply