Wanted: VIC online emulator

You need an actual VIC.

Moderator: Moderators

User avatar
Kweepa
Vic 20 Scientist
Posts: 1303
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

Bumping for a new version that runs Heist correctly and now has sound.
Remaining is cartridge loading support (should be simple) and bug fixes.

The source code is also available for those interested:
http://www.kweepa.com/step/vic20/javic092108b.zip
User avatar
Jeff-20
Denial Founder
Posts: 5764
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

I can't get either to work. The controller input seems off. From the title screen, Heist doesn't start at all. It doesn't seem to recognize the shift key as a fire button trigger. Blue Star starts with the space bar, but it right keypad entry is interpreted as a jump and the up arrow is recognized as right... Am I doing something wrong?
High Scores, Links, and Jeff's Basic Games page.
User avatar
Kweepa
Vic 20 Scientist
Posts: 1303
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

If you hold down the shift key too long something goes wrong with the keyboard input. I need to investigate that.

The joystick is set up with 0 on the numeric keypad as the fire button.

A new version of the web page is up with (all?) the games from the last year or so. Double height characters aren't supported so VicTragic's games don't work so well. Also, for some reason it doesn't like the big BASIC programs either... :cry:

http://www.kweepa.com/step/vic20/javic.html
Sdw
Vic 20 Drifter
Posts: 32
Joined: Wed Aug 13, 2008 8:15 am

Post by Sdw »

Won't work at all for me (tried it on two different computers). It seems to have some kind of problems with Swedish keyboards:

Code: Select all

Starting CPU
Status: initializing
URL: jar:http://www.kweepa.com/step/vic20/javic006.jar!/roms/kernal
Read ROM /roms/kernal
Installing rom at :e000 size:8192
URL: jar:http://www.kweepa.com/step/vic20/javic006.jar!/roms/basic
Read ROM /roms/basic
Installing rom at :c000 size:8192
URL: jar:http://www.kweepa.com/step/vic20/javic006.jar!/roms/chargen
Read ROM /roms/chargen
Installing rom at :8000 size:4096
Locale: sv_SE
Checking map for: sv
Found map - mapping...
Remapped: ; => ?  key 59 => 65533
Remapped: ' => ?  key 39 => 65533
Remapped: [ => ?  key 91 => 65533
Remapped: \ => Þ  key 92 => 222
Remapped: / => -  key 47 => 45
Remapped: ] => ?  key 93 => 135
Remapped: - => ?  key 45 => 521
Remapped: = => ?  key 61 => 129
java.lang.ArrayIndexOutOfBoundsException: 65533
	at com.kweepa.javic.Keyboard.<init>(Keyboard.java:352)
	at com.kweepa.javic.VICVideo.init(VICVideo.java:131)
	at JaVICApplet.init(JaVICApplet.java:54)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Post by nippur72 »

I just tried the JaVic emulator...! it's simply great!!!!

And notice, it's the first emulator that shows the CORRECT ASPECT RATIO ! I love it!

One silly question: how do I compile the source code? Do I need some Java developing package? I would like to experiment with the code and, in case, give some help (unfortunately Java is not my favourite language).

Also, what is the license on JaVic? can we use it in our personal webpages (giving proper credits to the authors)? I hope so, it would be nice if we could run in our webpages the software we have released.
User avatar
girv
Vic 20 Newbie
Posts: 17
Joined: Tue May 29, 2007 9:30 am
Location: Northern Ireland

Post by girv »

Awesome work! I'll see if I can whip up a web page with some of my own favourite games in it.

How likely is it that Blitz, Jetpac, RIP, Rock Man, Matrix or Star Defence will work with the emulator in it's current state? I think Star Defence might be a multi-load effort.
User avatar
Kweepa
Vic 20 Scientist
Posts: 1303
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

I'm not sure if you can reference games that aren't in the jar, but you can give it a try. Put them in a "games" folder at the same level as the jar.

Multiload is probably out unless you make each part its own prg; I haven't written cart support yet; and the noise generator is rubbish (I wrote the current sound support in an hour). I haven't played any of those games on the VIC-20 so I can't give you a good answer to whether they'll work or not.

I think there shouldn't be a problem using it on your own web page. I didn't check the license that jac64 uses but I suspect he won't have a problem with it. Speaking of which I should probably let him know I hacked up his project.

To compile the source, I'm using the NetBeans IDE that Sun provides with the JDK. It's pretty awesome. Full refactoring, debugging, code completion and so on.

Glad someone noticed I changed the aspect ratio - I made the pixels 3x2 instead of the usual 2x1. Not quite accurate, but It makes text much more readable, and as a side effect the applet is 639x480 (639 is 6*71, and 71 is the cycles per scan line in PAL).
User avatar
Jeff-20
Denial Founder
Posts: 5764
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

The aspect ratio is amazing. I never imagined this sort of project would progress so quickly!
High Scores, Links, and Jeff's Basic Games page.
User avatar
girv
Vic 20 Newbie
Posts: 17
Joined: Tue May 29, 2007 9:30 am
Location: Northern Ireland

Post by girv »

FWIW, JaC64 is GPL so I guess JaVic (I'd have gone with "Jarvic" myself ;)) is fine to use anywhere so long as the source is available as well.
Kweepa wrote:To compile the source, I'm using the NetBeans IDE that Sun provides with the JDK.
I never got on with NetBeans' auto indent feature but I think that's just me being awkward and being used to Eclipse from work. I also found it easier to customise the build process with Eclipse. I'll give NB 6.5 a whirl though, to try the new PHP editing features.

Is the JaVic source available yet?
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Post by nbla000 »

Kweepa wrote:Glad someone noticed I changed the aspect ratio - I made the pixels 3x2 instead of the usual 2x1. Not quite accurate, but It makes text much more readable, and as a side effect the applet is 639x480 (639 is 6*71, and 71 is the cycles per scan line in PAL).
Yes, finally a vic-20 emulator with correct aspect ratio.

By looking the JaC64 site i've noticed that you may play the emulator in two ways: Play Now! and Double Size!.
Actually JaVic start in Double Size! right ?
Do you think to enable single size mode for JaVic too ?


PS: There are 2 days that i cannot "test" JaVic from your web page, wip ?
Mega-Cart: the cartridge you plug in once and for all.
Sdw
Vic 20 Drifter
Posts: 32
Joined: Wed Aug 13, 2008 8:15 am

Post by Sdw »

Kweepa: No idea on what might be causing the bug I posted about before? Seems like it is some kind of dynamic keymappign that goes wrong...
User avatar
Kweepa
Vic 20 Scientist
Posts: 1303
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

Sdw wrote:Kweepa: No idea on what might be causing the bug I posted about before? Seems like it is some kind of dynamic keymappign that goes wrong...
Oh, I thought I answered that already. You're right, it's the swedish keymap that the original author had in there, that I didn't rip out. I rewrote some of the underlying keyboard support but I guess I broke that on top.

JarVIC is a cool name, but the doctor you reference sold out to big pharma recently in some commercials so I'm conflicted.

I didn't realize the site was down. Should be working...?
Single size would mean distorted pixels again, but maybe that's ok small.
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Post by nbla000 »

Kweepa wrote:To compile the source, I'm using the NetBeans IDE that Sun provides with the JDK. It's pretty awesome. Full refactoring, debugging, code completion and so on.
Just for testing purpose i've tried to create the jar file using NetBeans IDE.
Right click on <default package> --> Compile Package F9

It makes a jar file on \dist subfolder, by using the command java -jar "JaVic.jar" the Emulator starts in a window.

No i wish to integrate it in a local html page, i rename it on javic003.jar and put it in the build\classes subfolder where the your html page is located but the browsers fails to load it, where i'm wrong ?

PS: Sorry for this annoying newbie question, i never used java before :oops: i wish to do tests with other games and try to understand something, don't worry for my request if you have better things to do...

I didn't realize the site was down. Should be working...?
oh no of course but it's fun to evaluate progresses just in time :wink:
Single size would mean distorted pixels again, but maybe that's ok small.
Thanks for your consideration.
User avatar
Kweepa
Vic 20 Scientist
Posts: 1303
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

You should be able to get it going by just copying the html file into the dist folder where the jar is.
I would have thought what you did would work too.
To make sure it's not using a cached jar, I usually increment the jar number and edit the html to say archive=javic00x.jar.

NetBeans has many options for code formatting. Probably for customizing the build process too... But I'm by no means an advocate. I just downloaded it to write JarVIC. Never used it before.

Hmm, JarVIC - it's the artificial heart of retro gaming. I like it.

The latest source is at http://www.kweepa.com/step/vic20/javic092108b.zip
User avatar
Kweepa
Vic 20 Scientist
Posts: 1303
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

I removed the swedish and german keymappings that were cocking up the emulator.
I renamed the emulator JarVIC.
I also added a normal size mode that can be accessed by setting the applet parameter doubleSize to 0.

Results here:
http://www.kweepa.com/step/vic20/jarvic.html
Source here:
http://www.kweepa.com/step/vic20/jarvic092308.zip

Still the same bugs with the hires mode, the noise channel and the 8-16k BASIC games.
Post Reply