Wanted: VIC online emulator

You need an actual VIC.

Moderator: Moderators

User avatar
girv
Vic 20 Newbie
Posts: 17
Joined: Tue May 29, 2007 9:30 am
Location: Northern Ireland

Post by girv »

Yeah, what's your beef with Inst? It must be bad if you had to move to Texas!
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 »

NI schools computer quiz final 1987. (No beef really.)

Image
Athlor
Vic 20 Drifter
Posts: 30
Joined: Mon Sep 01, 2008 11:58 pm

Post by Athlor »

Glad to see you got graphics going on yours. I just finished up the memory configurations. I basically patched the rom to bypass the ramtest and stored the results where they would have gone. Now each configuration works perfectly. Here's 4 on 1 screen with a poke on each screen just to show it knows where the screen is:
Image
The single class file is under 20k. In a jar with a rom under 10k. Not much bigger than the flashing gif animation.
JJ Abrams Star Trek: Boldly going where we've already been...
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 »

Cool!
Small and fast, pretty much the opposite of mine which is about 250k...
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Post by nbla000 »

hey guys, i love you both :oops:

Just to understand, i think that is technically possible in java from the browser upload a file, right ?
but does the emulator may use this file or the file must be integrated in the applet ?
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 »

A Java applet runs in sandbox mode, so it is not allowed to read files from your local file system.
To support user-upload, you would have to have a site with PHP/ASP/CF or something that accepts file uploads from the user, then use those files from the Java applet.
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 »

Here's the current progress:

http://www.kweepa.com/step/vic20/javic.html

Unfortunately Tetris+ and Heist lock up before getting into gameplay. I'm not sure what's going on there. Seems I've emulated the VIC-20 the way I understood it when writing Blue Star :)
Still no sound either.
User avatar
Jeff-20
Denial Founder
Posts: 5764
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Impressive! Loads quickly for me. It's truly a beautiful thing!

I really enjoy seeing Heist there. My program is incredibly simple. So it is a good subject to diagnose problems with the emulator.

From the title screen, it seems like the RVS character mode doesn't work. However, multicolor mode does work. That's the first thing I notice about my program. Then it seems to lock up at the moment when WAIT is called. The command would be WAIT 37152,32,32. I don't know if that helps you figure out the problem.
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 »

Oh yes, that helps immensely. Thanks!
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Post by nbla000 »

I don't understand what mess with wrong tetris+ Vertical Centering, have you tried another 3k game ?
About freeze at start of the game, maybe is the same Heist problem.

If you need i will investigate further on what happen in this part, but i guess is a simple wait loop like dex/bne, dey/bne or dec $zp/bne or similar.

PS: I've tested classic/arcade and trial modes with or without music.
Mega-Cart: the cartridge you plug in once and for all.
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 »

The centering was a simple error in the display code. All good now (but not changed on-line yet).

Jeff, what are you trying to do with that WAIT command? It doesn't seem to correspond to anything on the joystick, for example.

I'm embarrassed to admit that I can't seem to work out how reverse mode works. I can get it to work without changing the character memory location but once I change character memory, it breaks.

Code: Select all

  int characterMemoryLocationIndex = memory[0x9005] & 0x0f;
  int characterMemoryLocation = (characterMemoryLocationIndex&7) << 10;
  if (characterMemoryLocationIndex < 8)
  {
    characterMemoryLocation += 0x8000;
  }
  boolean reverseMode = ((memory[0x900f] & 0x08) == 0);
  if (reverseMode)
  {
    characterMemoryLocation
            = (characterMemoryLocation & 0xf000)
            + (characterMemoryLocation + 0x0400) & 0x0fff;
    // also tried cml ^= 0x0400;
    // and cml = (cml & 0xf000) + ((cml + 0x0400) & 0x0fff);
  }
*Confused*

[EDIT]

Ok, I got Heist showing the reverse characters, but I'm still not sure which of these is correct.

Code: Select all

  int characterMemoryLocationIndex = memory[0x9005] & 0x0f;
  boolean reverseMode = ((memory[0x900f] & 0x08) == 0);
  if (reverseMode)
  {
    if (WHICH)
    {
      characterMemoryLocationIndex += 0x01;
      characterMemoryLocationIndex &= 0x0f;
    }
    else
    {
      characterMemoryLocationIndex ^= 0x01;
    }      
  }

  int characterMemoryOffset = 8*(characterIndex&0x7f) + screenMemoryRowOffset;
  int characterMemoryBlock = (characterMemoryLocationIndex + (characterIndex>>7))&0x0f;
  // skCharacterMemoryLocations is the table from p216 of the programmer's reference guide
  int characterDef = memory[skCharacterMemoryLocations[characterMemoryBlock] + characterMemoryOffset];
Pretty cool though, I didn't know before you could mix user-defined and normal characters without raster tricks.
User avatar
Jeff-20
Denial Founder
Posts: 5764
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Kweepa wrote: Jeff, what are you trying to do with that WAIT command? It doesn't seem to correspond to anything on the joystick, for example.
The WAIT command in my program is used to halt the program until the joystick fire button is pressed.
High Scores, Links, and Jeff's Basic Games page.
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Post by nbla000 »

Kweepa wrote:The centering was a simple error in the display code. All good now (but not changed on-line yet).
now is changed :D

I've just finished my first on-line play of Tetris+ 8)


Very good work, many compliments
be careful when you implement sound too...
Carlsson's tunes are fantastic, you need to play it from home not office if you want prevent boss attention :wink:
Mega-Cart: the cartridge you plug in once and for all.
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Post by nbla000 »

I've tested the javic emulator for a while, new online record on Tetris+ :wink:

In my opinion it seems in an advanced state, all included games are full playable without compromises, have you tested some rom for blk5 and/or blk5 + blk3 or blk2 like Donkey Kong or Pole Position ?

When the emulation is started, it works in the local machine without internet connection too, this means that do not use too much bandwidth, this is important for Jeff or any other guy who want to implement JaVic in his web space.

I'm really impressed from your work, ok you started from an existing project but you got very good results in a very brief time.

Except audio section what are missing things at the moment ?

Have you tested 8/16k programs ?
you may try the Nippur72's Return of fort knox sequel, Return to fort knox for 8k games and the Victragic Frogger conversion, Frogger '07 for 16k games.
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 still working on the VIAs.

Heist is still not quite working - RND(0) always returns 1 right now, so the ladders are all on the right hand side of the screen. RND(0) mixes the counters from T1 and T2 of VIA1 then mucks around a bit to get a value between 0 and 1. When the VIC starts up it doesn't do anything to start up the VIA1 timers (it does start VIA2 T1) so I'm guessing they must start active. But I haven't managed to find any useful documentation, and my last resort (because it may not be correct) of the VICE source code is particularly unreadable.

After that, sound.

I haven't tested anything else - you found out Tetris+ worked before I did!
Post Reply