|
Post by richard on Feb 13, 2014 13:22:13 GMT -5
This is drawn in Google Sketchup, put onto an Arduino and displayed on the Vectrex!
There are some whispy ghost lines as the Arduino can't drive the Z axis low enough. The Vectrex needs +/-5v and I'm using 0 to 2.8V at the moment.
I'm going to add some op-amps to give me the full voltage swing so I can use the whole screen!
|
|
|
Post by TrekMD on Feb 13, 2014 13:57:50 GMT -5
Looks nice!
|
|
|
Post by hcmffm on Feb 13, 2014 15:11:09 GMT -5
A very smooth animation. Nice!
|
|
|
Post by richard on Feb 13, 2014 15:17:37 GMT -5
A very smooth animation. Nice! Cheers! The rotation speed (change in angle per re-draw) is variable as is the line draw speed. the trick is getting the speeds tuned to make the display smooth. I'd like to know more about how the vectrex draws lines. I have a 12 bit DAC which I write values to at 15 unit intervals.
|
|
|
Post by Der Luchs on Feb 13, 2014 15:47:12 GMT -5
Very cool!
|
|
|
Post by detonator on Feb 13, 2014 20:21:05 GMT -5
Could Vectrex handle the original Battlezone in its full glory? Waddyasay?
It'd be a great release.
|
|
|
Post by VectorX on Feb 13, 2014 20:26:02 GMT -5
I'm not sure, but I do know a programmer would really have to know their stuff to be able to pull it off.
There's currently a demo being worked on, so maybe we'll know in a year or two if it becomes a full-fledged game?
|
|
|
Post by richard on Feb 14, 2014 11:32:06 GMT -5
I would have a lot of respect for anyone who codes Battlezone to run on a Vectrex!
I'm cheating using an Arduino Due (Arm core SAM3 processor running at 84mhz!), so my code is in C!
I think the Arduino could do it standing on it's head!
I might see if I can port a version onto it and see how well it works. Assuming there are some open source implementations out there...
|
|
|
Post by mikiex on Feb 14, 2014 13:18:13 GMT -5
I'm not sure, but I do know a programmer would really have to know their stuff to be able to pull it off. There's currently a demo being worked on, so maybe we'll know in a year or two if it becomes a full-fledged game? I think its possible. I read an interview with one of the guys who worked on the original. Yes they used Math box as a co-processor.s But I would say a lot of it could of been done using pre-calculated tables. Especially he mentioned they even didn't rotate in all axis. btw Richard cheating yes.... but you're forgiven because its vectors and anything vector graphics = cool It would be cool to have a reasonably priced device to interface to the vectrex
|
|
|
Post by VectorX on Feb 14, 2014 13:32:55 GMT -5
I would say kokovec could possibly do something like that, as he's always wanted to bring some reasonably-priced device of some sort to the Vectrex that he could mass produce. Maybe some year...
|
|
|
Post by richard on Feb 15, 2014 10:15:30 GMT -5
It would be cool to have a reasonably priced device to interface to the vectrex The Adruino Due is pretty cheap (if you buy a clone), it has 2 DAC's to drive the x and y. The Z axis controls the brightness, so could be done as a resistor ladder. Next you need three opamps to get the right +/- 5 v swings. Cheap and easy to build on veroboard. An alternative is a standard Arduino with add on DAC's (or a single DAC and mux/sample&hold.) but that's getting more complex to knock up of veroboard! Then you only get a 8mhz processor instead of a 32 bit 84mhz powerhouse. It's an easy mod as you just unplug one connector! I'm going to try and get another vectrex with a knackered processor board to play with....
|
|
|
Post by kokovec on Feb 18, 2014 17:48:59 GMT -5
Ya, I still have my prototype 3D adapter and I'm still considering a re-design that would make it cheaper to mass produce. It uses quaternions to calculate 3D transforms and it's very fast. It will run the calculations in the background as the Vectrex does other things. I don't see why a Battlezone clone couldn't be made for the Vectrex using a 3D transform engine.
By the way I really like what you did with the Arduino driving the CRT directly. Makes me want to see what I can do with a Raspberry Pi.
|
|
|
Post by madtronix on Feb 18, 2014 18:16:02 GMT -5
Wow great project, richard! I have two vectrexes with broken CPUs, I get think I should repurpose them soon:-) Ya, I still have my prototype 3D adapter [...] It will run the calculations in the background as the Vectrex does other things. Do I understand right, that you use the transformation processing on the cartdridge header? So you would do something like the 32x for the megadrive? If one would use the Arduino due for bitbanging the vectors to be drawn directly to the Vectrex (so the Vectrex does no calculations, just draws vectors it reads from the ROM (which is the arduino connected to the cartdridge port)) would you be able to receive similar results like the animation above? I like where this is going:-)
|
|
|
Post by richard on Feb 19, 2014 13:13:55 GMT -5
To be honest, once you drop an arduino into the back, you might just as well do all the coding on it.
You can write code in C and you get loads of debugging facilities, loads of flash memory, usb download, even wifi and SD cards with a shield etc etc.
I don't see much benefit in keeping the 6809 in the loop (even though it as cool chip - I learned assembler on one with a 7 segment display and a hex keypad!)
I found that the processor spends a lot of time drawing the lines. I'm not sure how the vectex does lines. Does anyone know exactly how it drives the DAC? Vectrex has an 8 bit dac (Arduino has a 12 bit Dac). When drawing a line (a horizontal line for example), you basically output a voltage that goes from 0v to 5v (to make a line from the middle to the edge), On Vectrex this would be 128 units on the DAC but I don't know if it actually ouputs all 128 discrete values or does it skip every 2 or 4? The beam will still move across the screen at the speed of the amplifier even if you go directly from 0 to 5v with no intermediate values.
|
|
|
Post by kokovec on Feb 19, 2014 13:59:45 GMT -5
My adapter presents an API to the Vectrex to use for 3D transforms. It also has an extra 17K memory that the adapter shares with the Vectrex which makes dealing with vector lists much easier.
I'm not sure if there would be much practicality in replacing all of the Vectrex guts with an Arduino board. I suppose it can be done but then you're basically running an emulator. If you're going to do that then it would probably be better to use a Linux based platform. Then you're not beholden to a specific Arduino board and write the emulator with portability in mind. I'm thinking building a USB to CRT adapter would be more useful.
|
|