Main Menu

Recent posts

#91
General Discussion / Re: Vectrex32 and Max MSP
Last post by troff - April 08, 2020, 06:23:08 PM
Thanks, I was thinking of starting off with something very simple, like have max MSP send a few ASCII characters via the usb, like maybe rs232 or something. And have the Vectrex32 listen for the data then do something like display something on the Vectrex screen.

Figured I'd start there and work up.

Any ideas to a newcomer to Vectrex32 as to how to set up a program that monitors the USB port as if it was a rs232 comm port?

#92
General Discussion / Re: Vectrex32 and Max MSP
Last post by Vectrex32 - April 08, 2020, 06:20:48 PM
Quote from: jaymzjulian on April 08, 2020, 05:46:49 PM
My initial thought around realtime was to using the usb-serial connection from the pc to the vectrex (I've used https://projectgus.github.io/hairless-midiserial/ to do this before), though I'm not sure there is a way from gsbasic to do that right now - Bob should be able to answer that one.

A BASIC program can read from the USB serial port using file I/O and Stdin. See the section in the Vectrex32 manual titled "File I/O" (section 7.12 in the version 1.23 manual).

- Bob
#93
General Discussion / Re: Vectrex32 and Max MSP
Last post by jaymzjulian - April 08, 2020, 05:46:49 PM
Quote from: Troff on April 07, 2020, 10:00:37 PM
Does anyone know if it's possible to send data from max MSP to the Vectrex 32?

If so does anyone have any example code?

Thanks everyone!

Do you mean to send the data in realtime, or in batch in order to create a standalone vectrex replayable thing? 

My initial thought around realtime was to using the usb-serial connection from the pc to the vectrex (I've used https://projectgus.github.io/hairless-midiserial/ to do this before), though I'm not sure there is a way from gsbasic to do that right now - Bob should be able to answer that one.  But from there it should be reasonably doable to turn that stuff into sound commands on the vx32 side.  If the way to interface to serial exists, I should be able to put together a quick demo code for that pretty quickly.

On the "I have AY/YM music made in max that I have made in max/msp, and want to replay that on the vectrex" variant of this question, if you can log it to a YM file (which is just a register dump, so i'd expect any tool that does YM music should do so), you can convert that a compressed form with https://github.com/cdepecker/YMCruncher , and then use the ayc player that's over on the code swap forum.  (YM files, while seperatly compressed, are compressed with lha which is a pain to decompress in realtime in basic)

On the "I am using max to create animations, not music" variant of this question, you'd need something to convert the vector output - most MSP vector tools i've seen use some varient of ilda commands, which could be interpreted, but my information is about 10 years out of date on that (I last used max myself in 2004 ;))
#94
General Discussion / Re: Vectrex32 and Max MSP
Last post by Vectrex32 - April 08, 2020, 07:51:56 AM
I haven't heard of anyone working on this. I know nothing about max MSP but I would think the first step is to export AY-3-8910 commands from it. Is it able to do that?

If so, you would need some JMOS ("just a matter of software") to convert that into BASIC.

- Bob
#95
General Discussion / Vectrex32 and Max MSP
Last post by troff - April 07, 2020, 10:00:37 PM
Does anyone know if it's possible to send data from max MSP to the Vectrex 32?

If so does anyone have any example code?

Thanks everyone!
#96
Code Swap / Re: Object Explosion Generator
Last post by jaymzjulian - April 03, 2020, 10:07:10 PM
Quote from: Vectrex32 on April 03, 2020, 12:13:59 PM
This is awesome! I'd love to see a video.

- Bob

video: https://www.youtube.com/watch?v=f1ucBlRXVR4

updated code including this demo attached - press button 2 to explode the cycle.

also in my tools github at https://github.com/jaymzjulian/vectrex32_tools
#97
Code Swap / Re: Object Explosion Generator
Last post by Vectrex32 - April 03, 2020, 12:13:59 PM
This is awesome! I'd love to see a video.

- Bob
#98
Code Swap / Object Explosion Generator
Last post by jaymzjulian - April 03, 2020, 12:10:59 PM
We all need to blow things up in our games, right?  This library will do that to any any object for you - i'm using the rose object i play with as a demo for this, but any LinesSprite or Lines3dSprite format object should do!  Assuming your line count is "normal", it's entirely reasonable to do this in realtime during your game - indeed, that's what the sample shows - although you could use it to generate an animation instead, with a little modification.

demos:

these are all deliberatly slow so you can see things :).

explosion-demo-nobreak - explode a simple object, dont disconnect the lines
explosion-demo-break - explode a simple object, disconnect the lines
explosion-demo - explode a complex object.  Note that, for some reason, this will sometimes crash the vectrex32 hard right now :(.  I don't know why!  Whjich is a shame, since it looks cool!

How to use in your own stuff:

1) include explosion.bai
2) call the function "prepare_explosion" with the following params:

' Params:
' dimensions - 2 or 3
' obj - the LinesSprite format object
' world_scale - scale of the world
' point - where to explode
' x_impulse - base impulse to hit object with on the x axis
' y_impulse - base impulse to hit object with on the y axis
' x_random - additional random impulse for x
' y_random - additional random impulse for y
' break_apart - true/false - do we break the vectors?


3) call either explode2d or explode3d each frame until you're done with the explosion.

sample:


' get the object
rose_object = rose()

' prepare the object for exploding - just expanding variables here for clarity :)
world_scale = 40
x_impulse = 2.5
y_impulse = 5.0
x_random = 2.5
y_random = 5.0
rose_explosion = prepare_explosion(2, rose_object, world_scale, {0,-400}, {x_impulse, y_impulse}, {x_random, y_random}, 9.8, -400, false)

' put it on the screen
LinesSprite(rose_explosion.dest)
controls = WaitForFrame(JoystickNone, Controller1, JoystickNone)
while controls[1,3] = 0
  call explode2d(rose_explosion)
  ' wait for next frame :)
  controls = WaitForFrame(JoystickNone, Controller1, JoystickNone)
endwhile
#99
News and Updates / Firmware upgrade: version 1.23
Last post by Vectrex32 - March 31, 2020, 02:49:42 PM
There's a new version of the Vectrex32 firmware available, version 1.23. If you already own Vectrex 1.10 or newer, you can download the firmware here. If you still have version 1.00, please read this.

There are a few new features and bug fixes but the most important change is that the Vectrex32 can now support much larger drawing lists. It does this by reusing the 2K dual-port RAM multiple times per frame.

- Bob
#100
General Discussion / Re: Guidence on code memory us...
Last post by Vectrex32 - March 11, 2020, 07:45:46 AM
But you still should return at some point, otherwise you keep creating scopes (even if they're empty) and adding to the call stack.