New Vic-20 demo for PAL machines: "Miami Vic"

Discuss anything related to the VIC
Post Reply
4mat/atebit
Vic 20 Newbie
Posts: 10
Joined: Fri Sep 25, 2009 6:40 am

New Vic-20 demo for PAL machines: "Miami Vic"

Post by 4mat/atebit »

Hi,

I just released a demo for unexpanded machines with a couple of screens in. You can download it here:

http://www.pouet.net/prod.php?which=53914

A little about myself, I used to be a member of Cosine where I wrote the "Astro Nell" game and a few other demos.

thanks, 4mat/atebit
User avatar
orion70
VICtalian
Posts: 4341
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Post by orion70 »

:shock: Effects in Screen 2 are impressive! Congrats on this work!
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 »

Very cool!
"Vic 20 newbie" indeed.

We were discussing how you fit Astro Nell into the unexpanded machine a while back. I noticed you built the rooms up from petscii character definitions. It also looks like some of the screen tiles are carefully chosen bits of code. Are the rooms randomly generated too? Some insight would be awesome.

Thanks!
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

What the heck!? I think my brain exploded. Awesome.
High Scores, Links, and Jeff's Basic Games page.
Vic20-Ian
Vic 20 Scientist
Posts: 1214
Joined: Sun Aug 24, 2008 1:58 pm

Post by Vic20-Ian »

If I understood the Petscii comment above this could be a way to encode for example a racetrack level in a single byte.

W U O S D G J L Z C V B N M 1 2 3 4 5 6 7 8 would all make interesting track shapes to navigate.

Perhaps the copper bar routine could be used as the track in a kind of mode 7? Buck Rogers type scroller routine.

The bar direction changes would take the direction changes from the bits in the character 8x8 matrix rather than a sine calculation.

There would need to be some kind of scaling / smoothing to make the turns possible but I like the idea of peeking the bits of the char set for level data or room shapes.
Vic20-Ian

The best things in life are Vic-20

Upgrade all new gadgets and mobiles to 3583 Bytes Free today! Ready
4mat/atebit
Vic 20 Newbie
Posts: 10
Joined: Fri Sep 25, 2009 6:40 am

Post by 4mat/atebit »

Hi,

Yes you're right, Astro Nell used the petscii rom for it's room blocks. Each 8x8 block was defined in 3 bytes:

byte1:
char rom position low byte.

byte2:
top 4 bits = colour
low 4 bits = x start position * 2 (so you can place only on 2 block boundries)

byte3:
top 4 bits = block type + char rom position high byte (2-bit numbers)
low 4 bits = y start position

I hope that's right, I just delved into the source after 5 years. :)
The average room was about 50 bytes, each sprite added 6 to the total and an object added 1. (offsets starting from top of screen rather than x,y)

Looking through the source one thing that might be useful is the soundfx routine, it's pretty short. (though could be optimized smaller)

Code: Select all


playcount = $b0
playadd   = $b4

;; Set sound: (ldx soundfx number)
;; If a sound is already playing on the target channel it'll be ignored.
soundsetup
lda sounddelay,x
and #$f0
lsr
lsr
lsr
lsr
tay
lda playcount,y
bne sounddont
lda sounddelay,x
and #$0f
sta playcount,y
lda soundadd,x
sta playadd,y
lda soundpitch,x
sta $900a,y
sounddont 
rts

;; Sound player (call this every vblank)
sounddriver 
clc
ldx #$03
soundloop lda playcount,x
bne soundplay
sta $900a,x
jmp soundend
soundplay 
dec playcount,x
lda $900a,x
adc playadd,x
and #$7f
adc #$80
sta $900a,x
soundend 
dex
bpl soundloop
timerout 
rts

;; Soundfx data:
;; Pitch to add each frame
soundadd    .byte $c0,$07,$c0,$49,$f7,$f1    
;; Length to play sound for. 
;; top 4 bits = sound channel (0-3), low 4 bits = duration
sounddelay  .byte $31,$18,$31,$2f,$3f,$03
;; Starting pitch for sound
soundpitch  .byte $de,$a4,$ee,$a2,$fe,$c8
I'm thinking about writing a sequel, could definately fit a lot more in these days.

On that race track idea, if you have a 'trailblazer' effect you could probably use the screen offset ($9000) to simulate turns? Might look a bit like the rollercoaster in 'Impossiblator 3': http://www.pouet.net/prod.php?which=31537

If I find my trailblazer fx I'll post it in 'programming', the main routine is tiny.
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 »

Thanks for the info.
A sequel sounds good! Go for it!
4mat/atebit
Vic 20 Newbie
Posts: 10
Joined: Fri Sep 25, 2009 6:40 am

Post by 4mat/atebit »

Anyone interested in the source for the original? I've uploaded it here:

http://www.mediafire.com/?33mr2iyydm1
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Wow!
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
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 »

And thanks for the source code! Very interesting!
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

If you dare, you can upload the demo and its source code to Zimmers FTP. I know at least Marko Mäkelä (VVV) and Albert of Pu-239 uploaded demo sources to the FTP server.
Anders Carlsson

Image Image Image Image Image
Post Reply