New Vic-20 demo for PAL machines: "Miami Vic"
-
- Vic 20 Newbie
- Posts: 10
- Joined: Fri Sep 25, 2009 6:40 am
New Vic-20 demo for PAL machines: "Miami Vic"
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
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
- Kweepa
- Vic 20 Scientist
- Posts: 1303
- Joined: Fri Jan 04, 2008 5:11 pm
- Location: Austin, Texas
- Occupation: Game maker
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!
"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!
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.
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
The best things in life are Vic-20
Upgrade all new gadgets and mobiles to 3583 Bytes Free today! Ready
-
- Vic 20 Newbie
- Posts: 10
- Joined: Fri Sep 25, 2009 6:40 am
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)
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.
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
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.
-
- Vic 20 Newbie
- Posts: 10
- Joined: Fri Sep 25, 2009 6:40 am
Anyone interested in the source for the original? I've uploaded it here:
http://www.mediafire.com/?33mr2iyydm1
http://www.mediafire.com/?33mr2iyydm1
Wow!
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)