I've never actually had this machine in my hands, but it always struck me as curious whenever I saw videos about it, so I decided to look into it a bit, and when I started seeing how it was designed, the truth is I found it all very interesting. So I thought about recreating it — why not?
As always, "the Alhambra has us hooked" XD, and it's totally true. A lot of the work we do on bigger FPGAs isn't exactly a piece of cake, but it would be much simpler.
The nice/fun/interesting thing about using a small FPGA like the ice40hx4k is that it forces you to squeeze the resources, and you learn a ton. A lot of what I learn in this kind of development I carry over into the professional world very effectively, or it simply helps you understand what's going on inside the silicon - which lets you tackle other challenges with a good perspective.
I looked at emulator code, and at the software level the recreation is very artificial. In the end they just make a translator from the vector chip's commands into traditional rendering in a framebuffer, and with GPU shaders they give it a glow effect and so on. I'm not saying it isn't well done, but it has nothing to do with the real machine and its physics - for me that loses a lot of the appeal.
The most original thing it has is its rendering mode: it doesn't use a framebuffer. This part could actually be interesting to use for small projects where you might want to draw things on screen in a vector style and don't have external memory for a large framebuffer.
The limit here is the number of vectors you can draw within the timing of a frame. Basically it's a Bresenham + reduced BSP tree for hardware, playing with the image's persistence (you'll see it vibrates a bit, though this gives it a more analog feel). Surprisingly, the concept works pretty well (I honestly didn't expect it to work like this — this was literally a job guided by intuition and an almost childlike curiosity).
So anyway, little by little it's been a project I've been carrying along for fun. I had it stuck for several months barely touching it, and these last few weeks, with the stuff I've been doing with Jesús (apparently nothing to do with this), things have borne fruit. We made some Verilog modules that, although aimed at other things, were exactly the pieces I was missing.
I'd been mulling over for several days that this might fit, and I put in a few hours this morning, integrating the cache pieces for the cartridge code, taking the opportunity to also drop in the AY recreation, and boom!!! — in relatively little time I was filled with excitement.
I'm sending you a bitstream in case you want to try it. It's very "green," or I should say "blue," never more fittingly, because as I said it was more a proof of concept than anything else. And after months thinking it really wouldn't fit in our beloved Alhambra (just the CPU I use from cavnex's project takes up more than half), here it is.... thanks to Jesús's Multimedia Shield and to community work, here we have another recreation :) In this case there isn't much room for "fancy tricks" - the FPGA runs at practically 99.9999%, I don't even know how it manages to route XD
The audio isn't 100% faithful because, to make it fit, I had to tie the chip's envelope wires to constants, so it's basically "tone only." If I evolve the design and optimize the area somehow - which right now I can't even think how — we could have the full replica (possibly by looking for another 68k core that's more area-optimal, although this is the only cycle-accurate one I've found in Verilog). If anyone feels like jumping in, I'll pass you the code soon, and maybe they'll figure out how to win us those 100-200 LCs we need to go full out XD
Right now the cartridge is fixed. If I managed to optimize area, we could consider a loader and be able to switch cartridges easily — I've left a classic one loaded.
This project has been pretty special for me because the silly idea of the analog video raster simulator was the classic motivating challenge, and seeing it work, even if the digital screen doesn't give it "glow", struck me as really curious (I expected to find an image with a lot of flicker and discontinuity).
By the way, although I integrated the PS2, cloning the code I used for Space Invaders, I haven't tested it because I don't have one on hand these days. If anyone tests it and confirms whether or not it works, I'd appreciate it, so I can try to adjust it even without having it available.
The keys are:
Arrow keys -> joystick P1
Z -> button 1
X -> button 2
C -> button 3
V -> button 4
We've got a whole pile of interesting projects stacking up — we'll talk about them in due course, releasing code and documentation. We have another brutal recreation of another computer from that era that we haven't dropped on you yet because it comes with a lot of pieces we want to document and tell you about, but it'll come.... we're organizing everything.
If anyone who has the shield wants to try it and see whether it reproduces, that would be great for getting feedback.
I've left here the bitstream, BIOS, and game cartridge to try (I haven't tested other games — if you test them, let me know; for another game you'd just have to flash it at the cartridge address).
The commands to run are:
iceprog vectrex_fpga_top.bin iceprog -o 0x080000 vectrex_bios.bin
https://drive.google.com/drive/folders/1tHTScGHUzQxorPQxLCQJuX1Oo8tG0ma-?usp=drive_link
With this, the BIOS boots along with the game it shipped with (Mine Storm). In theory, if we burned a ROM at 0x082000, the system should run it (and to get back to Mine Storm you'd have to fill with 0xFF from that address onward). I haven't tested this yet — I need to track down ROMs and so on — but anyway, if anyone feels like it, the experiment is easy. The only thing is you'd have to combine BIOS and cartridge and not flash blithely at 0x082000, because since iceprog flashes in 64KB blocks, it could clobber the BIOS due to alignment.
I'll be preparing this calmly, but anyway I'm leaving it for you just in case, and as I said, we'll keep releasing all these things.
And a reminder that anyone interested in the shield can sign up here: https://icestudio.io/buygroup-alhambramm/ — I haven't said anything about it, not because I've abandoned it, but because we're still wrapping up tests/demos, basically validating that everything works perfectly and generating material so it becomes a full learning platform.
We're already working on how to manufacture it in volume, and those of you who sign up help us gauge interest and thus estimate volume and adjust the price as best as possible.
Thank you all so much — I hope you enjoy it.
--
Has recibido este mensaje porque estás suscrito al grupo "FPGAwars: explorando el lado libre" de Grupos de Google.
Para cancelar la suscripción a este grupo y dejar de recibir sus mensajes, envía un correo electrónico a fpga-wars-explorando-el...@googlegroups.com.
Para ver este debate, visita https://groups.google.com/d/msgid/fpga-wars-explorando-el-lado-libre/9fe1078d-8556-45f1-ad00-4a0b4c23b4e5n%40googlegroups.com.
Carlos, lo he probado y no aparece imagen ni sonido. Se enciende el led6.Saludos.
--
Has recibido este mensaje porque estás suscrito al grupo "FPGAwars: explorando el lado libre" de Grupos de Google.
Para cancelar la suscripción a este grupo y dejar de recibir sus mensajes, envía un correo electrónico a fpga-wars-explorando-el...@googlegroups.com.
Ha funcionado! He tomado el zip en el que sale una carpeta típica para saber que es un Mac, porque crea una subcarpeta con sus historias. Adjunto vídeo y mis felicitaciones!
--
Has recibido este mensaje porque estás suscrito al grupo "FPGAwars: explorando el lado libre" de Grupos de Google.
Para cancelar la suscripción a este grupo y dejar de recibir sus mensajes, envía un correo electrónico a fpga-wars-explorando-el...@googlegroups.com.