Dingoonity.org

Dingoo Official Firmware => Releases => Topic started by: nzeemin on September 17, 2010, 02:45:12 pm

Title: Vectrex SDL
Post by: nzeemin on September 17, 2010, 02:45:12 pm
I prepared first quick-and-dirty version for port of vecx (http://www.johnhawthorn.com/2009/12/vectrex-emulator-sdl-port/) -- Vectrex console emulator.
The emulator written on SDL and uses SDL_gfxPrimitives drawing routines.

Some adoption made for Dingoo screen: rotated by 90 degree, D-pad rotated too.
For now, emulator comes with only one game, built in the console ROM -- Minestorm -- Asteroids-like.

(http://img-fotki.yandex.ru/get/4609/nzeemin.5/0_47157_1606a99_L.jpg)

Download: http://code.google.com/p/nzeemin-opensrc/downloads/detail?name=VectrexSdl_0_1.zip
Source: http://code.google.com/p/nzeemin-opensrc/source/browse/#svn/trunk/dingoo/VectrexSdl

Buttons: 1 = Y, 2 = X, 3 = B, 4 = A
Button A works as fire in Mindstorm.
Title: Re: Vectrex SDL
Post by: TheCaffeinator on September 17, 2010, 04:57:57 pm
Nice work, nzeemin, and a good first step in a direction I think many Dingoo owners will enjoy. There have been many requests for Vectrex emulation. Thanks!

So...right now, it just goes right into Mine Storm? No way to select other games yet? I have a big selection of Vectrex ROMs waiting to be played on my Dingoo. Woo-hoo!

Also, for the future, keymapping would be great. I'm a big proponent of adding keymapping to emus, apps and games, since one of the first things I do when I play a new emu, app, or game is try to map heavily-used functions off of the A & B buttons and onto the X & Y buttons. The reason is that A & B are already heavily used by the OS itself, so I always try to prevent extra "wear" on these buttons.

A "nice-to-have" but totally unnecessary feature would be a selector for applying the color overlays the Vectrex system came with. ;)
Title: Re: Vectrex SDL
Post by: darfgarf on September 17, 2010, 04:59:34 pm
...wait, so this is being distributedm, with a rom of a commercial game embedded inside it? isn't that kindof illegal in most places?
Title: Re: Vectrex SDL
Post by: TheCaffeinator on September 17, 2010, 05:38:15 pm
Hmm...curious scenario in that the Mine Storm was actually built into the Vectrex console system itself, so truly emulating the system means including the game.

Does that mean that someone who writes a Vectrex emulator should then write their own PD rom clone of Mine Storm or that Vectrex emulators should just not include the game at all?

It's not the same as a pack-in scenario in which a cartridge is included with a system -- like Super Mario & Duck Hunt coming with the NES.

Interesting situation.

Title: Re: Vectrex SDL
Post by: nzeemin on September 17, 2010, 05:41:29 pm
...wait, so this is being distributedm, with a rom of a commercial game embedded inside it? isn't that kindof illegal in most places?

Quote from the "Vectrex Emulator SDL port" page:
"A good thing about the vectrex is that the original games are freely available for non-commercial use."

But I didn't dig deep inside the copyright question...
Title: Re: Vectrex SDL
Post by: TheCaffeinator on September 17, 2010, 05:45:26 pm
From http://www.arcadeathome.com/dl.phtml?vectrex/vectrexroms.zip :

"Vectrex ROMs were made public domain in the 90's. They are free to distribute as long as they are not sold."
Title: Re: Vectrex SDL
Post by: darfgarf on September 17, 2010, 05:45:56 pm
weird, never get games loaded onto the hardware these days, it'd be like getting an xbox, with halo on some rom chip XD

guess it's all fine and dandy then in that case
Title: Re: Vectrex SDL
Post by: nzeemin on September 17, 2010, 06:44:30 pm
What's better file extension for Vectrex roms? Will .vecx be good enough for the emulator?
Title: Re: Vectrex SDL
Post by: Coccijoe on September 17, 2010, 06:49:33 pm
Thanks you, i tested it, it's good!
My vectrex roms are .bin but I don't know if it's the better file extension.
Title: Re: Vectrex SDL
Post by: nzeemin on September 17, 2010, 07:20:49 pm
Nice work, nzeemin, and a good first step in a direction I think many Dingoo owners will enjoy. There have been many requests for Vectrex emulation. Thanks!

So...right now, it just goes right into Mine Storm? No way to select other games yet? I have a big selection of Vectrex ROMs waiting to be played on my Dingoo. Woo-hoo!
Thanks for this.

Please take a look at version 0.2 -- SIM version now. Just put it in GAME folder, put rom.dat in VECX subfolder. Also put any roms in VECX subfolder with .vecx extension. Enjoy!

Download: http://nzeemin-opensrc.googlecode.com/files/VectrexSdl_0_2_sim.zip
Title: Re: Vectrex SDL
Post by: Coccijoe on September 17, 2010, 07:56:40 pm
thanks, roms work when we rename files extension, so it's great.
I don't know why but some roms don't run. Ideas?
Title: Re: Vectrex SDL
Post by: nzeemin on September 17, 2010, 08:00:23 pm
thanks, roms work when we rename files extension, so it's great.
I don't know why but some roms don't run. Ideas?

Try them with some Vectrex emulator on PC.
Nobody perfect, perhaps vecx sdl emulator I used as a source contains some bugs or the roms was corrupted.
Title: Re: Vectrex SDL
Post by: Coccijoe on September 17, 2010, 08:04:34 pm
thank you for your quick response, I'll try that, but do not worry it is only a few roms.
Sorry for my English, I'm from France ^ ^
Title: Re: Vectrex SDL
Post by: nzeemin on September 17, 2010, 08:07:20 pm
Sorry for my English, I'm from France ^ ^
Don't worry, I'm Russian  ;D
Title: Re: Vectrex SDL
Post by: Chris23235 on September 17, 2010, 09:55:39 pm
Thank you very much for your work, I always missed a Vectrex Emulator on the Dingoo, while try it now.
Title: Re: Vectrex SDL
Post by: Coccijoe on September 17, 2010, 10:48:14 pm
I notice a problem, when I push long time on X during the games, emulator stop working and return to menu.
Title: Re: Vectrex SDL
Post by: squidlaser on September 17, 2010, 10:52:10 pm
Vectrex on Dingoo! Thanks.
Title: Re: Vectrex SDL
Post by: TheCaffeinator on September 17, 2010, 10:58:49 pm
What's better file extension for Vectrex roms? Will .vecx be good enough for the emulator?

All the ones I got have a .vec extension.

I can probably just add the extra "x"... no big deal.

Having said that, there does seem to be a tendency toward 3-character extensions when possible... .smc, .mvs, .smd, .sms, .lnx, .col, .pce, .nes, .ngc, .gba, .a26, .a78, etc. I'm just sayin'.
Title: Re: Vectrex SDL
Post by: TVSMASHER on September 17, 2010, 11:20:47 pm
WOWWWOWOWOWWWW  :o :o :o :o

MUCHO THANKS for your work!
Title: Re: Vectrex SDL
Post by: TheCaffeinator on September 17, 2010, 11:49:33 pm
Just tried the .SIM version. Very nice! Compatibility seems very good so far... even runs PD ROMs.

I'm not getting any sound. Is this me or the emu?

Will a config screen be coming down the road?
Title: Re: Vectrex SDL
Post by: Domian on September 17, 2010, 11:58:01 pm
I notice a problem, when I push long time on X during the games, emulator stop working and return to menu.


Answere:
Harteex, looks like SDL has the bug with X button: if the button pressed for long time (about 3 sec) the program quits.
That's standard "feature" of sys_judge_event -- Tim0xA was first who found it: http://boards.dingoonity.org/dingoo-development/platform-independant-dingoo-sdk/msg17853/#msg17853
So now all SDL-based games build with dingoo-sdk have the same "feature".
It's not really bug, but a feature in the OS. There are two ways you can use to fix it:

Either, before SDL init, do SDL_putenv("DINGOO_IGNORE_OS_EVENTS=1");
This is a dingoo specific flag to ignore the system events.

Otherwise you may also simply look for this code: if (event.type == SDL_QUIT)
and comment out the code so that you don't do anything on a quit event.
Title: Re: Vectrex SDL
Post by: Domian on September 18, 2010, 12:01:46 am
I have a big selection of Vectrex ROMs waiting to be played on my Dingoo. Woo-hoo!
If they are free to share, can you share them? If it is ok by the Admins that is ofc?
Title: Re: Vectrex SDL
Post by: TheCaffeinator on September 18, 2010, 05:02:45 am
I didin't realize it at the time, but I kind of already did, which probably would have gotten me banned if the ROMs weren't already in the public domain. Just look at my earlier posts in this thread; it'll be obvious.
Title: Re: Vectrex SDL
Post by: Domian on September 18, 2010, 08:47:24 am
I didin't realize it at the time, but I kind of already did, which probably would have gotten me banned if the ROMs weren't already in the public domain. Just look at my earlier posts in this thread; it'll be obvious.
oh yea, stupid me :D missed that! thank you :)
Title: Vectrex SDL 0.3
Post by: nzeemin on September 18, 2010, 02:11:13 pm
Vectrex SDL 0.3 -- now with overlays!

This version seek for file <gamename>.png.
For now I prepared only two overlays: for Frogger and for Armor games.

(http://img-fotki.yandex.ru/get/4505/nzeemin.5/0_471a8_8731156c_L.jpg)

Download: http://nzeemin-opensrc.googlecode.com/files/VectrexSdl_0_3.zip

Some more words on overlays. The .png file should be 320x240 pixels, so the image rotated 90 degree clockwise.
There are some overlays prepared for MESS project: http://mess.redump.net/_media/artwork:vectrex.zip but the images should be resized and rotated.
Title: Re: Vectrex SDL
Post by: Chris23235 on September 18, 2010, 07:56:40 pm
Thanks for your work, any plans of including sound?

Maybe Fuzzi23 can provide us with a nice pack of overlays already converted for the Dingoo?
Title: Re: Vectrex SDL
Post by: nzeemin on September 18, 2010, 08:03:19 pm
Thanks for your work, any plans of including sound?

Maybe Fuzzi23 can provide us with a nice pack of overlays already converted for the Dingoo?

All I done for the moment was just recompiling the existing emulator with some tuning. So I'm not ready to enhance it to the next level right now, sorry. First I have to finish one other project for Dingoo. Will see after that.
Title: Re: Vectrex SDL
Post by: Chris23235 on September 19, 2010, 02:42:50 am
No rush, right now I am happy to have Vectrex on my Dingoo at all.
Title: Re: Vectrex SDL
Post by: fuzzi23 on September 21, 2010, 10:22:13 pm
Yes, Yes...  Yessssss!!! ;D

After Amiga now my dearly beloved Vectrex. Thank you so much nzeemin. That's what I was waiting for. Now all that's missing is an VPinMAME Port. ;D

Quote
Maybe Fuzzi23 can provide us with a nice pack of overlays already converted for the Dingoo?

yes, as chris knows I work on an complete overlay pack (includes overlays for each homebrew game). But I want first complete my work before I publish them, so it could take months until it is done. :-\
Title: Vectrex SDL 0.4
Post by: nzeemin on September 23, 2010, 04:06:17 pm
Vectrex SDL 0.4:

Download: http://nzeemin-opensrc.googlecode.com/files/VectrexSdl_0_4.zip
Enjoy!

Title: Re: Vectrex SDL
Post by: Chris23235 on September 23, 2010, 05:03:39 pm
Runs great, the Overlays look fine. No only sound is missing, if you manage to add it, you would make many people happy, but even without sound, thanks for your work.
Title: Re: Vectrex SDL
Post by: nzeemin on September 23, 2010, 05:47:10 pm
Runs great, the Overlays look fine. No only sound is missing, if you manage to add it, you would make many people happy, but even without sound, thanks for your work.

Thanks for the kind words.

BTW I found a vecx emulator fork with sound support. Hope I can adopt it to my version.
http://petersieg.webng.com/vectrex/vectrex.html
Title: Re: Vectrex SDL
Post by: nzeemin on September 23, 2010, 08:27:10 pm
So, I adopted the AY emulation code from that vecx fork, and it works on PC,
BUT it doesn't work on Dingoo :(
Looks like I found a bug in Dingoo SDL audio implementation.
I reported it so we'll see what dingoo-sdk developers will say about it.
Title: Re: Vectrex SDL
Post by: Chris23235 on September 23, 2010, 09:07:16 pm
Interesting developent, I will stay tuned. :-)
Title: Re: Vectrex SDL
Post by: Coccijoe on September 24, 2010, 12:00:16 am
thank you for your work !
Title: Re: Vectrex SDL
Post by: djdron on September 24, 2010, 09:57:22 am
Where we can get plastic screen overlays for Dingoo?  :D
Title: Re: Vectrex SDL
Post by: Hellblaze on September 28, 2010, 04:59:42 am
Nice :)

I'm crossing my fingers that you can get sound working at some point.

Is there a way to get ROMS to run off the miniSD Card? Not a major issue, was just worried I was doing something wrong...
Title: Re: Vectrex SDL
Post by: nzeemin on October 01, 2010, 06:46:57 pm
Bad news. I just noticed that overlays make the emulator run too slow. Will work on it.
Title: Vectrex SDL 0.6 -- now with sound
Post by: nzeemin on October 03, 2010, 09:32:16 pm
Thanks for Harteex for dingoo_sdk patch, so this release includes sound support.
But I noticed that games run too slowly with overlays, so looks like you have to choose, use overlay or hear sounds at proper speed.
Just remove .PNG if you don't need overlay.

Download: http://nzeemin-opensrc.googlecode.com/files/VectrexSdl_0_6.zip
Title: Re: Vectrex SDL
Post by: Chris23235 on October 04, 2010, 11:29:36 am
Many thanks, sound support is great :-)
Title: Re: Vectrex SDL
Post by: capt_bugaloo on January 13, 2011, 03:19:10 am
I just got around to checking out this Vectrex emulator for the Dingoo.  It is a really great port!
Thank you!

If I had any complaint, it is that the vector graphics only take advantage of about 80% of the screen.  Is it possible to scale up the graphics to take full use of the Dingoo's screen?
Title: Re: Vectrex SDL
Post by: Sandro Tandrilion on February 25, 2011, 01:39:31 pm
Congratulations, the emulator is great! Vectrex has smooth games and I love it.

Just a suggestion, it's a little of hard to rotate the Dingoo in the vertical position and press the buttons above the screen. Could you include customizations of buttons in the next version? It would be nice to use select, R and L, instead of, A,B, X.

Thanks a lot!
Title: Re: Vectrex SDL
Post by: darkborn on February 26, 2011, 12:35:43 pm
Emulator is great, it is good work. However, there are few things that could be done:
-obviously, it lacks speed with overlays and sound together. So there should be option to disable - sound/overlays.
Overlays are very nice, and with overclocking it could works together, so imho overlays option should not be abandoned.
Title: Re: Vectrex SDL
Post by: Chris23235 on February 26, 2011, 10:55:06 pm
Emulator is great, it is good work. However, there are few things that could be done:
-obviously, it lacks speed with overlays and sound together. So there should be option to disable - sound/overlays.
Overlays are very nice, and with overclocking it could works together, so imho overlays option should not be abandoned.

Simply remove the png, as the author suggested earlier.
Title: Re: Vectrex SDL
Post by: CREATICA on December 13, 2011, 12:02:18 am
Man, this is great! I didn't know anything about this console. What's next? a port of Polybius? hahaha just pulling the leg. Keep up the great work.

Title: Re: Vectrex SDL
Post by: streeker on December 22, 2016, 02:16:34 pm
Here's an idea: since several Vectrex games (like Amor Attack, Bedlam, MineStorm, Star Castle, Space Wars, etc.) would also be perfectly playable with the Dingoo held normally, i.e. horizontally, wouldn't it be nice to have something like a toggle button for the D-pad controls to be rotated back 90 counterclockwise? That way, these games could be played a lot more comfortably without having to flip the whole Dingoo vertically everytime. The shoulder buttons might be perfect for toggling the controls, I would say.

Now, I don't know, if nzeemin is still active around here anymore. If not, is there possibly another good soul capable of coding, that might be willing to have a look at the source code? It's still available online: https://code.google.com/archive/p/nzeemin-opensrc/source/default/source?page=6

Thanks!