Jump to content
IGNORED

What happened to the VESWiki?


EmOneGarand

Recommended Posts

I've been experimenting with sprite drawing on the Channel F, and well.. it's not working too well lol. Question is.. what happened to the VESWiki? It's gone, so where can one turn for Channel F development and help? Doubt too many really even care about the tiny homebrew scene for the Channel F (what was it.. 3 people?)

Link to comment
Share on other sites

  • 1 month later...
I've been experimenting with sprite drawing on the Channel F, and well.. it's not working too well lol. Question is.. what happened to the VESWiki? It's gone, so where can one turn for Channel F development and help? Doubt too many really even care about the tiny homebrew scene for the Channel F (what was it.. 3 people?)

 

 

What's the problem then? ;-)

 

I also wonder about the VESwiki - the whole site seems to be empty.

 

Blackbird (VESwiki owner) uses these subroutines to plot a sprite in our game Pac-man:

 

 

The sprite.draw routine:

;---------------------------------------------------------------------------
; Draw Sprite 
;---------------------------------------------------------------------------
; draw a 8x5 sprite from a data pointer
; r1 = color
; r2 = x (to screen)
; r3 = y (to screen)
; r4 = sprite number

sprite.draw:
; blit reference:
; r1 = color 1 (off)
; r2 = color 2 (on)
; r3 = x position
; r4 = y position
; r5 = width
; r6 = height

; get the tile address
dci	sprites
; add the offset
lr	A, 4
inc							; make sure we hit 0
lr	0, A
lis	2						; two bytes for each sprite
sprite.draw.addressLoop:
ds	0
bz	sprite.draw.addressLoop.end
adc
br	sprite.draw.addressLoop
sprite.draw.addressLoop.end:
; load the address for this sprite's number
lm
lr	Qu, A
lm
lr	Ql, A
lr	DC, Q

; load the sprite size (8x5)
lis	8
lr	5, A
lis	5
lr	6, A
; load the position
lr	A, 3
lr	4, A
lr	A, 2
lr	3, A
; load the colors
lr	A, 1
lr	2, A
li	clear
lr	1, A

; draw the sprite
jmp	blit

 

 

The blit routine:

;---------------;
; Blit Function ;
;---------------;
; this function blits a graphic based on parameters set in r1-r6,
; and the graphic data pointed to by DC0, onto the screen
;
; originally from cart 26, modified and annotated
; uses r1-r9, K, Q
;
; r1 = color 1 (off)
; r2 = color 2 (on)
; r3 = x position
; r4 = y position
; r5 = width
; r6 = height (and vertical counter)
;
; r7 = horizontal counter
; r8 = graphics byte
; r9 = bit counter
;
; DC = pointer to graphics

blit:
; adjust the x coordinate
lis	4
as	3
lr	3, A
; adjust the y coordinate
lis	4
as	4
lr	4, A

lis	1
lr	9, A						; load #1 into r9 so it'll be reset when we start
lr	A, 4						; load the y offset
com							; invert it
blit.row:
outs	5						; load accumulator into port 5 (row)

; check vertical counter
ds	6						; decrease r6 (vertical counter)
bnc	blit.exit					; if it rolls over exit

; load the width into the horizontal counter
lr	A, 5
lr	7, A

lr	A, 3						; load the x position
com							; complement it
blit.column:
outs	4						; use the accumulator as our initial column
; check to see if this byte is finished
ds	9						; decrease r9 (bit counter)
bnz	blit.drawBit					; if we aren't done with this byte, branch

blit.getByte:
; get the next graphics byte and set related registers
lis	8
lr	9, A						; load #8 into r9 (bit counter)
lm
lr	8, A						; load a graphics byte into r8

blit.drawBit:
; shift graphics byte
lr	A, 8						; load r8 (graphics byte)
as	8						; shift left one (with carry)
lr	8, A						; save it

; check color to use
lr	A, 2						; load color 1
bc	blit.savePixel					; if this bit is on, draw the color
lr	A, 1						; load color 2
blit.savePixel:
inc
bc	blit.checkColumn				; branch if the color is "clear"
outs	1						; output A in p1 (color)

blit.transferData:
; transfer the pixel data
lis	$6
sl	4
outs	0
lis	$c
sl	4
outs	0
; and delay a little bit
blit.savePixelDelay:
;	ai	$60
;	bnz	blit.savePixelDelay				; small delay

blit.checkColumn:
ds	7						; decrease r7 (horizontal counter)
bz	blit.checkRow					; if it's 0, branch

ins	4						; get p4 (column)
ai	$ff						; add 1 (complemented)
br	blit.column					; branch

blit.checkRow:
ins	5						; get p5 (row)
ai	$ff						; add 1 (complemented)
br	blit.row					; branch

blit.exit:
; return from the subroutine
pop

 

 

Basic plot routine:

 

;---------------;
; Plot Function ;
;---------------;

; plot out a single point on the screen
; uses three registers as "arguments"
; r1 = color
; r2 = x (to screen) (0-101)
; r3 = y (to screen) (0-57)

plot:
; set the color using r1
lr	A, 1
outs	1

; set the column using r2
lis	4
as	2						; fix the x coordinate
com
outs	4

; set the row using r3
lis	4
as	3						; fix the y coordinate
com
outs	5

; transfer data to the screen memory
lis	$6
sl	4
outs	0
lis	$5
sl	4
outs	0

; delay until it's fully updated
;	lis	6
;plot.delay:	
;	ai	$ff
;	bnz	plot.delay

pop							; return from the subroutine

 

 

The data is formatted like this, first a list of adresses and then the data itself:

 

;======================================================================
====
; Sprite Data
;===========================================================================

;---------------------------------------------------------------------------
; Sprite Array
;---------------------------------------------------------------------------

sprites:
.word	gfx.clearSprite					; sprite 0

.word	gfx.pacman.up.0					; sprite 1
.word	gfx.pacman.up.1					; sprite 2
.word	gfx.pacman.up.2					; sprite 3
.word	gfx.pacman.up.3					; sprite 4

.word	gfx.pacman.down.0					; sprite 5
.word	gfx.pacman.down.1					; sprite 6
.word	gfx.pacman.down.2					; sprite 7
.word	gfx.pacman.down.3					; sprite 8

...  etc

... and then

;---------------------------------------------------------------------------
; Clear Sprite
;---------------------------------------------------------------------------

gfx.clearSprite:
; 5x5 block to clear
; a drawn sprite
.byte	%11111000
.byte	%11111000
.byte	%11111000
.byte	%11111000
.byte	%11111000

;---------------------------------------------------------------------------
; Pac-Man Sprites
;---------------------------------------------------------------------------

gfx.pacman:
; pacman sprites

gfx.pacman.up.0:
.byte	000000
.byte	%10001000
.byte	%11011000
.byte	%11111000
.byte	%01110000
gfx.pacman.up.1:
.byte	000000
.byte	%11011000
.byte	%11111000
.byte	%11111000
.byte	%01110000
gfx.pacman.up.2:
.byte	%01110000
.byte	%11111000
.byte	%11111000
.byte	%11111000
.byte	%01110000
gfx.pacman.up.3:
.byte	000000
.byte	%11011000
.byte	%11111000
.byte	%11111000
.byte	%01110000

gfx.pacman.down.0:
.byte	%01110000
.byte	%11111000
.byte	%11011000
.byte	%10001000
.byte	000000
gfx.pacman.down.1:
.byte	%01110000
.byte	%11111000
.byte	%11111000
.byte	%11011000
.byte	000000
gfx.pacman.down.2:
.byte	%01110000
.byte	%11111000
.byte	%11111000
.byte	%11111000
.byte	%01110000
gfx.pacman.down.3:
.byte	%01110000
.byte	%11111000
.byte	%11111000
.byte	%11011000
.byte	000000

 

 

In your program you use these routines and data like this to draw a sprite:

; set color
li	green                  ; this is a variable already set to correct hex-value in the ves.h-file
lr	1, A
; load x coordinate
lis	5
lr	2, A
; load y coordinate
lis	10
lr	3, A
; set sprite index                 ; fourth sprite in data-list above (0,1,2,3,... )
lis	3
lr	4, A
; set bitmask
li	%11111000        ; plots only 5 bits wide
lr	5, A
; draw the sprite
pi	sprite.draw

 

Outcut from VES.h:

;------------------------
; Colors
;------------------------
red			 =	   $40
blue			=	   $80
green		   =	   $00
bkg			 =	   $C0
clear		=	$FF

Link to comment
Share on other sites

  • 3 months later...
  • 7 months later...
  • 2 weeks later...

OK, it (and a whole lot more) can be found on the veswiki.

 

 

I recently finished a blitgraphic converter, which converts a two-color bitmap to blitgraphic formatted data, it too can be found on the veswiki.

 

Yesterday I finished a MultiBlitGraphic converter - it takes a 16 color bitmap and converts it into MultiBlitGraphic data, I'm planning to combine the two into one program. It uses a fixed color table instead of checking and comparing the colors of the bitmap to what the Channel F can produce.

 

I haven't decided exactly how it's going to look in the final version, probably black (bkg), blue, red, green, lt. green (bkg), lt.grey (bkg), lt blue (bkg), white (interpreted as blue which displays as white on a b/w row) and the other eight colors interpreted as background. I'll add an example picture with the program so the "correct" palette can be used when drawing your own MultiBlit-objects.

 

 

 

 

Making graphics is now pretty easy!

Link to comment
Share on other sites

  • 1 year later...
  • 2 years later...

... which isn't working anymore so I set it up at channelf.se and also registered veswiki.com that points directly to the wiki. As I decided not to add the short URL hack the veswiki.com links found in search engines like google won't work. Go to the domain and then search for what you want or add the "index.php?title=" part that is missing in those links.

 

I only had a version from 2007 as backup, that will have to work for now unless I get hold of Blackbird and get a copy of the missing stuff.

 

http://veswiki.com

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...