|
Post by christophertumber on Aug 4, 2014 14:59:19 GMT -5
Used V-Model quite a bit over the week-end. And there were a bunch of annoyances I wanted to fix. So here's a new version. There are a few key changes from last time so you may not want to get rid of your old version just yet (the extracted file structure for use in source code). It still runs in DOS so you'll probably need to setup DOS Box if you haven't already. If you've been using V-Model already you should be fine. What's New - 0.5 ----------------- Improve rounding when rotating. Fix "extra" vectors when loading shapes (remains of previous shapes). Extract to ASM: - Choose between (X,Y) and (Y,X) - Format is now macro definitions (because it's good for you! Use as Include files.) - Uses Filename as Shape names (Because typing in names for all shapes is a big PITA.) (Yeah, I should bite the bullet and remake it but it works fine and a rewrite is a significant project I don't really want to spend the time on.) Attachments:V-Model5.zip (67.04 KB)
|
|
|
Post by VectorX on Aug 4, 2014 15:19:30 GMT -5
What is this?
|
|
|
Post by Rapetou33 on Aug 4, 2014 15:55:42 GMT -5
Thank you very much
|
|
|
Post by christophertumber on Aug 4, 2014 16:04:38 GMT -5
It's a vector set design tool from back in the day. You probably need to install Dos Box to run it: www.dosbox.com/
|
|
|
Post by VectorX on Aug 4, 2014 16:08:33 GMT -5
Thanks, I hadn't heard of it.
|
|
|
Post by christophertumber on Aug 4, 2014 16:54:28 GMT -5
Basically, it allows you to enter/edit (x,y,z) points. Displays the resulting vectors and draws them. It includes some rotation and transformation functions. Particularly rotating about the x, y and/or z axis for pre-calculated vector sets. And maximizing vector sets for optimal drawing. And can output to a text file that can be used in assembly language source code.
Only really useful for coding, but a pretty big timesaver.
|
|
|
Post by VectorX on Aug 4, 2014 16:55:55 GMT -5
And can output to a text file that can be used in assembly language source code. Sounds useful indeed
|
|
|
Post by Rapetou33 on Aug 5, 2014 4:11:17 GMT -5
Only really useful for coding Btw I have sent you a PM.
|
|
|
Post by christophertumber on Aug 5, 2014 21:54:39 GMT -5
Gaa! There was a bug in the Maximize routine which could result in vectors >127 due to not taking the absolute value of vectors. So negative vectors were treated as very short and never potentially long. Problem has existed since the original version but likely due to mostly symmetrical designs there would have generally been a corresponding positive vector. Attachments:V-Model6.zip (67.13 KB)
|
|
|
Post by xefned on Oct 23, 2014 6:38:16 GMT -5
Woo! Successfully launched V-Model 6 on a Mac in DOSBOX. If all goes as planned, I'll be displaying my first unique drawings on Vectrex hardware soon. Thanks Chris!
|
|
|
Post by christophertumber on Oct 23, 2014 8:02:14 GMT -5
|
|
|
Post by gliptitude on Nov 4, 2014 15:04:33 GMT -5
If all goes as planned, I'll be displaying my first unique drawings on Vectrex hardware soon. Thanks Chris! I've used older versions of V-Model, although I never acquired the programming knowledge to implement the files it produced into a program. .. But as far as displaying your own unique images on Vectrex, I HAVE been able to do that very easily with Vectorzoa's VecDraw tool. It was originaly made for gamers to submit sprites for a contest, so doesn't really require any programming, just editing the coordinates in the text file provided. .. If you are anxious to see your own vector objects right away you can probably still get that on his old website and flash your own .bin within hours or even minutes. I don't mean to detract from the thread subject. It's great to see this program updated and supported. .. I originally learned about V-Model from Fury, when he was active in these forums. I think he had said he uses it regularly. So it definitely gets used in real Vectrex game production, which I hope to get in on at some point.
|
|
|
Post by christophertumber on Nov 7, 2014 15:45:15 GMT -5
I've used older versions of V-Model, although I never acquired the programming knowledge to implement the files it produced into a program. .. V-Model files are extremely easy to incorporate into Vectrex programs. You generally want to extract to (Y,X) text files (under the file menu) to do this. Note that v-model can't load these text files. If you want to re-use the vectors later in v-model you must Save them. Below is a very simple program which will display a single sprite (v-model or otherwise). If you save your sprite to a file named TEST.TXT then you only need to make one change to this program which is in this line: fcb 8 ;Change this to the number of vectors in your sprite
^You must change the 8 to the number of vectors in your sprite. Optionally, you can also change this line: fcb 63 ;Change this to the scale you want to draw your sprite
^Which is the scale the sprite will be drawn. If you save to a different filename then you need to change these lines: include "TEST.TXT" ;Change this to the filename
test_000 ;Name of the macro in your v-model.txt file
Replace "TEST.TXT" to the new filename Replace test_000 with the macro definition on the first line of the text file. Which if you haven't changed anything will be the filename_000 Note: If you save in v-model to a filename like TEST.TXT you will need to open of the text file and remove the .txt in the macro name otherwise the assembler will have an error - It's on my todo list to fix this. ;*************************************************************************** ;List of files to include ;***************************************************************************
include "TEST.TXT" ;Change this to the filename you saved your ;v-model data too
;*************************************************************************** ;Defintion of BIOS subroutines ;***************************************************************************
Intensity_7F equ $F2A9 reset0ref equ $f354 waitrecal equ $f192 draw_sprite equ $f3b5
; start of vectrex memory with cartridge name... org 0 ;Tells assembler to start ROM at 0 ;*************************************************************************** ; HEADER SECTION ;Vectrex uses this for boot screen. Won't run without it. ;*************************************************************************** fcb $67,$20 fcc "GCE " fcb $80 fdb music fdb $f070 fdb $30c0 fcc " " fcb $80,$0
;*************************************************************************** ; CODE SECTION ;***************************************************************************
main: jsr waitrecal ;Wait until the start of the next frame
jsr Intensity_7F ;Set the intensity to maximum ldx #Sprite ;Set pointer to start of sprite data jsr draw_sprite ;Call BIOS subroutine to draw sprite
jmp main ;Do it forever
music: fdb $fee8 fdb $feb6 fcb $0,$80 fcb $0,$80
Sprite: fcb 8 ;Change this to the number of vectors in your sprite fcb 63 ;Change this to the scale you want to draw your sprite ;Current scale is pretty big test_000 ;Name of the macro in your v-model.txt file
|
|
|
Post by christophertumber on Nov 7, 2014 15:46:02 GMT -5
This is a sample TEST.TXT file you can use to test this:
test_000 macro fcb 31,0 fcb -62,31 fcb 0,-15 fcb 15,-8 fcb 0,-16 fcb -15,-8 fcb 0,-15 fcb 62,31 fcb 0,0 endm
|
|
|
Post by christophertumber on Nov 7, 2014 15:51:37 GMT -5
V-model is pretty useful for making sprite sized graphics, particularly animations, be they animations through rotation (which v-model has functions to handle) or by stepping through frames.
For larger graphics, like title screens, I generally use a spreadsheet to convert from a co-ordinate based to vectors.
In both cases, I generally start with MSPaint
|
|