Jump to content
IGNORED

Let's create a TI99 handheld!


tmop69

Recommended Posts

I recently purchased a Retroflag GPi Case (http://retroflag.com/GPi-CASE.html). It's a GameBoy-like case for the Raspberry Pi Zero, with a 2.8 inch IPS screen. The Pi is placed in a cart that you connect to the case similarly to a console's cart. With RetroPie on the Pi you can create a portable retro-gaming machine.

 

The GPi is good product in general, the buttons and the D-pad are responsive and the screen looks fine, no tearing or lags. I have installed/configured with RetroPie all these systems (that runs fine on the Pi 0):
Atari 2600, 7800, Genesis/Megadrive, Master System, NES, PC Engine, Vectrex, SG 1000, Game & Watch, Game Gear, Game Boy, Lynx, Famicom Disk System, Coleco, Intellivision, lr-MAME 2000, VideoPac/Odyssey 2, ZX Spectrum, MSX/MSX2, C64 and of course the TI99/4A!

 

The GPi Case has a D-Pad and 8 buttons: A, B, X, Y, Start, Select and RB, LB on the back of the case. These are enough for all the consoles. With Colecovision, Intellivision, Spectrum and C64 it's possible to have virtual keyboards/keypad overlays so you can start all the games without having to hook up a Bluetooth keyboard. Really comfortable!

 

Guess what? Only the TI 99 emulator needs a keyboard to start the games! ?

 

 

The only emulator that can run on the Pi Zero is TI-99/Sim created by Marc Rousseau (https://www.mrousseau.org/programs/ti99sim/). It's a nice emulator, with good compatibility and speech support. It's not at MAME's level, but it's enough to play most games in this TI99 handheld.

 

Unfortunately, the joystick config is hardcode and doesn't fit well with RetroPie/EmulationStation ecosystem. You need a keyboard to pass from TI99 initial screen to the game and play with the joypad. Moreover, the GPi Case is configured by default with the D-pad in Hat mode and the emulator is only using Axes mode. It's possible to change mode pressing Star+Up for 5 second, but then you need to reconfigure EmulationStation for using the menu.

 

Looking at TI-99/Sim I've seen a new 0.16.0 version (released after last RetroPie distribution) and in the changelog there is a comforting note: "Changes to better support RetroPie setup & joystick usage", but no additional infos in the docs. I've contacted Marc asking for additional information. He explained that has ported the code to SDL2.0 and managed to get the keyboard emulation working properly. Basically, the joypad buttons can also simulate the pression of keys 1 to 9, so allowing to pass from title/option screen to the game.
That sounds good, so I've compiled and tested this new version. It's now possible to move to the game screen, hovewer when testing Parsec I realized that it does not allows to change the speed for the refuel section. All the buttons acts as Fire button! ? Moreover, I cannot play Donkey Kong (it asks for Enter key...) and other Atarisoft games. The same for Alpiner, Big Foot, etc. Finally, to select a new game it's necessary to exit from the emulator pressing ESC on keyboard. I need also to press FCTN-REDO at game over to play again...

 

Since I do not want to use a keyboard nor uninstall the emulator, I decided to have a look at the source code to "patch" it. ;-)
I've added the Hat support and now it's possible to play most of the games without a keyboard. ?

 

Most of the joypads have at least 8 buttons, so a minimal set of needed keys/combination of keys needs to be identified to run confortably most of the games. The ideal number of keys to have would be: 0 to 9, Enter, Space, +, FCTN+QUIT, FCTN+REDO, FCTN+BACK, FCTN+AID. Total is 17, plus the "Fire" button and "ESC" to exit from the emulator, for a total of 19 keys. This number must be reduced, since normally there are less button available. For example, the Xbox One controller has 10 buttons + 2 triggers, the 8bitdo SF30 has 12 buttons + 2 triggers.

 

For my Retroflag's GPi Case 8 buttons layout, the selected keys are: Fire, 1, 2, 3, ESC, FCTN+QUIT, FCTN+REDO and Enter. With a joypad with 2 additional buttons it's possible to have also "+" and FCTN+REDO. Finally, with a 12 buttons joypad , it's possible to have also Space and 0.

 


Summer is approaching and I know that there are guys here that needs to play some Parsec and MunchMan under beach umbrella, so in attachment the "patched" executable and the .cpp source if someone want to improve/made its customisation. ;-)

 

Also a couple of images and videos (not edited, just raw recording, sorry for the poor production...). If you need .ctg games tested and ready to run, just check at the end of the article on the TI99 emulation with Raspberry on TI99IUC site (http://www.ti99iuc.it/web/index.php?pageid=homepage&artid=203#.XuZAoG5uKUk).


Try this TI99 handheld, it's really fun! ?

 

1.jpg

2.jpg

4.jpg

ti99sim-0.16.0-Joypad_Patch.zip

  • Like 9
  • Thanks 3
Link to comment
Share on other sites

8 hours ago, Tursi said:

That looks really nice on that screen, too! :)

 

Yes, the screen works very well. I've not experienced tearing or other problems. The luminosity is set to middle range in the videos.

 

Having a handheld version of TI99 it's really, really fun! I suggest to try it. There are 3/4 similar case solution that can also use the Pi 3B+ version of the Raspberry.

 

Do you plan in future to gift us a version of your great Classic99 emulator for the Raspberry? ?

Link to comment
Share on other sites

4 hours ago, tmop69 said:

Do you plan in future to gift us a version of your great Classic99 emulator for the Raspberry? ?

It's more than 2.5 years out. ;)

 

I go back and forth, honestly. I like the rise of the Retroarch emulators, but I also like being in control of my toolset. But I don't know when I'll get to the Classic99 rewrite anyway. It will be a lot more modular, though, so I think that opens up the option. (I know this because I already started it once, then I got buried in a slew of bugfixes and updates and frankly, I need to start over.)

 

  • Like 4
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, globeron said:

Wow looks cool on the Retroflag GPI!


I had the same issue with the keyboard on the Sony PSP

but see minute 5.52 https://youtu.be/xvDwXt-oMbg

but I cannot test 0.16 on PSP as we sold it.

 

but will upgrade the RetroPie

The changes for the keyboard layer surely were introduced by the author of the port to PSP. It was also added an initial menu for selecting SSS carts, etc.

Unfortunately, the original Linux and Windows version are all "command line" driven. ?

 

 

Link to comment
Share on other sites

I'm not adding anything by saying this is pretty cool!  Having the ability to curl up next to the cat, and go after that bigfoot will be nice. That keyboard mapping issue is the primary reason I haven't bothered with TI on retropie previously... 

 

Ordered one of these Retroflag GPI's today... I have always one more PI-Zero-W than I need cause I keep forgetting I have a spare, and ordering new ones. This might break the cycle :)

  • Like 4
Link to comment
Share on other sites

  • 4 months later...

Thanks for the mod, been trying to get this for a while.  I have a different controller and am trying to remap the buttons and keypresses.

 

I have downloaded the full souce of ti99sim.16, but can't get the buttons to register a different keypress than what is in your ti99sim file.

 

I look at what you have done and change the case number, the order the case#s are in and the VK_#, the run make and make install (with and without sudo) from the ~/ti99-simsdl.16 directory.  The output list the text ti994a-sdl.cpp then returns to the command prompt.

 

I restart emulatiostaion and the pi, but the buttons don't chance.

 

Should I change something is in the file?

I can poke around the command line, modify some config files and try to reverse engineering scripts I find on the internet to suit my purpose, but am having trouble with this one.

 

Would you be able to give me a little more guidance as to how to change the buttons on a controller to issue different keypresses to the ti99.16 emulator?

 

Thanks

 

Link to comment
Share on other sites

23 hours ago, jaud7of8 said:

Thanks for the mod, been trying to get this for a while.  I have a different controller and am trying to remap the buttons and keypresses.

 

I have downloaded the full souce of ti99sim.16, but can't get the buttons to register a different keypress than what is in your ti99sim file.

 

I look at what you have done and change the case number, the order the case#s are in and the VK_#, the run make and make install (with and without sudo) from the ~/ti99-simsdl.16 directory.  The output list the text ti994a-sdl.cpp then returns to the command prompt.

 

I restart emulatiostaion and the pi, but the buttons don't chance.

 

Should I change something is in the file?

I can poke around the command line, modify some config files and try to reverse engineering scripts I find on the internet to suit my purpose, but am having trouble with this one.

 

Would you be able to give me a little more guidance as to how to change the buttons on a controller to issue different keypresses to the ti99.16 emulator?

 

Thanks

 

 

Are you sure to use the modified version? I don't remember if make install is using the correct RetroPie path.

 

Compile the modified version with your mapped buttons, then replace manually the binary in /opt/retropie/emulators/ti99sim to be sure.

 

My steps were:

 

sudo su -
cd /home/pi/ti99sim-0.16.0/
mv /home/pi/RetroPie/roms/ti994a-sdl.cpp src/sdl/.       <---- I'm editing the ti994a-sdl.cpp file from PC, then moving it in this Samba share. Change this step if you're editing using vi
make
cp bin/ti99sim-sdl /opt/retropie/emulators/ti99sim

 

Check the timestamp of the ti99sim file to be sure that you are using the updated file.

 

 

If you are using the correct file, next step is to check the mapping events for your controller, using the xboxdrv tool. Have a look at this link:

https://sinisterspatula.github.io/RetroflagGpiGuides/Controls_Updater_Menu

 

Note that the new version of ti99sim is using SDL 2.0, so here are some docs on joy events:

https://wiki.libsdl.org/SDL_JoyHatEvent#Remarks

 

Hope it helps.

 

 

 

 

 

 

Link to comment
Share on other sites

40 minutes ago, Omega-TI said:

Total $?

The GPi Case is approx. 65E on Amazon (with bag+heatsink). You need a Raspberry Pi0 that is approx. 10E for Wifi version, approx. 6E without it. Then you need a MicroSD that is 10E for 64GB or you can reuse an old one (8GB is ok). Probably the whole will be less expensive in US.

 

Note that you can run a lot of additional systems in addition, of course, to our TI99. The Raspberry Pi0 can handle up to the Genesis/PC Engine without problems. 

 

Do you plan to but one for Christmas? ? It's fun...

 

  • Thanks 1
Link to comment
Share on other sites

13 hours ago, tmop69 said:

 

Are you sure to use the modified version? I don't remember if make install is using the correct RetroPie path.

 

Compile the modified version with your mapped buttons, then replace manually the binary in /opt/retropie/emulators/ti99sim to be sure.

 

My steps were:

 

sudo su -
cd /home/pi/ti99sim-0.16.0/
mv /home/pi/RetroPie/roms/ti994a-sdl.cpp src/sdl/.       <---- I'm editing the ti994a-sdl.cpp file from PC, then moving it in this Samba share. Change this step if you're editing using vi
make
cp bin/ti99sim-sdl /opt/retropie/emulators/ti99sim

 

Check the timestamp of the ti99sim file to be sure that you are using the updated file.

 

 

If you are using the correct file, next step is to check the mapping events for your controller, using the xboxdrv tool. Have a look at this link:

https://sinisterspatula.github.io/RetroflagGpiGuides/Controls_Updater_Menu

 

Note that the new version of ti99sim is using SDL 2.0, so here are some docs on joy events:

https://wiki.libsdl.org/SDL_JoyHatEvent#Remarks

 

Hope it helps.

 

 

 

 

 

 

Thanks, I forgot to move the new ti88sim-sdl file to the /opt.... folder

I appreciate the follow up!

Link to comment
Share on other sites

7 hours ago, jaud7of8 said:

Thanks, I forgot to move the new ti88sim-sdl file to the /opt.... folder

I appreciate the follow up!

Great it is solved. What controller/handheld are you using?

 

Another change that could be added, is to use one of the Start/Select buttons as a "selector" to switch between different key mappins. E.g. pressing Select once is used for a mapping that fits for TI carts, pressing twice for Atari carts, etc.

 

 

Link to comment
Share on other sites

3 hours ago, tmop69 said:

Great it is solved. What controller/handheld are you using?

 

Another change that could be added, is to use one of the Start/Select buttons as a "selector" to switch between different key mappins. E.g. pressing Select once is used for a mapping that fits for TI carts, pressing twice for Atari carts, etc.

 

 

I am using the 8bitdo SN30.

The switching sounds useful.

Edited by jaud7of8
wording
Link to comment
Share on other sites

  • 1 year later...

Small comment on this - I got this working on RetroPie v4.7.1 (Nov 20211)
Took a little bit of fiddling about.

Thanks a lot @tmop69 I've just replaced the retropie ti99sim binary with your compiled version (and added -orig to the original file to back it up,)

At first when I ran a game, it took me back to emulation station menu. I checked the error log and it said 'permission denied'. So in WinSCP I looked at the permissions given to the original ti99sim-sdl file, and updated it to the the same permissions as the original file, and now it works!

Now using a basic cheap SNES controller I can do everything, no keyboard required!!

Left shoulder - quit back to Emulation Station to select another game
West button - launch a game
North button - fire lasers (in Parsec)


 

  • Like 4
Link to comment
Share on other sites

  • 1 month later...
On 10/28/2020 at 4:03 AM, tmop69 said:

Great it is solved. What controller/handheld are you using?

 

Another change that could be added, is to use one of the Start/Select buttons as a "selector" to switch between different key mappins. E.g. pressing Select once is used for a mapping that fits for TI carts, pressing twice for Atari carts, etc.

 

 

This worked great on my Pi3B+.   Thanks for this!

 

Two things... this would be great to have as the actual shell of the Ti99sim and not to have to modify it.  It's a major complaint many make that a keyboard is required, but you did a great job of getting around it.  Have you talked to anyone over at RetroPie about getting it in as part of the Ti99sim package?

 

Another is a separate issue.  I can't seem to get Ti99sim out of full screen mode, even after removing the "-f" from the run statement in my emulators.cfg.   It doesn't react to any strings to change the video settings.  I was able to make it look at least 4:3 with setting it to CEA-4 video in the runcommand box.

 

Do you have any idea why this is ?  I've already posted a query on RetroPie Forum, with Mitu answering me, but nothing changes the look.

https://retropie.org.uk/forum/topic/32048/ti99sim-resolution/4?_=1642732499610

 

My present screen... like I said to him, I can live with this... it just looks odd.

 

Thanks in advance!

 

 

screen.jpg

Link to comment
Share on other sites

11 hours ago, IMBerzerk said:

This worked great on my Pi3B+.   Thanks for this!

 

Two things... this would be great to have as the actual shell of the Ti99sim and not to have to modify it.  It's a major complaint many make that a keyboard is required, but you did a great job of getting around it.  Have you talked to anyone over at RetroPie about getting it in as part of the Ti99sim package?

 

Another is a separate issue.  I can't seem to get Ti99sim out of full screen mode, even after removing the "-f" from the run statement in my emulators.cfg.   It doesn't react to any strings to change the video settings.  I was able to make it look at least 4:3 with setting it to CEA-4 video in the runcommand box.

 

Do you have any idea why this is ?  I've already posted a query on RetroPie Forum, with Mitu answering me, but nothing changes the look.

https://retropie.org.uk/forum/topic/32048/ti99sim-resolution/4?_=1642732499610

 

My present screen... like I said to him, I can live with this... it just looks odd.

 

Thanks in advance!

 

 

screen.jpg

 

I think the -f could work only on Windows. Anyway the image looks crips and correctly scaled ("pixel perfect") for your resolution. It looks a little "strange" just because it's setting the whole background to the same blue color, instead of showing black bars on sides. It's a 4:3 ratio, but in a 16:9 screen area.

 

 

Link to comment
Share on other sites

5 hours ago, tmop69 said:

 

I think the -f could work only on Windows. Anyway the image looks crips and correctly scaled ("pixel perfect") for your resolution. It looks a little "strange" just because it's setting the whole background to the same blue color, instead of showing black bars on sides. It's a 4:3 ratio, but in a 16:9 screen area.

 

 

Yes. That's my problem. I'd like it just to be 4:3 with black boarders.  But nothing seems to work for that with this emulator.  The performance is great though.

 

I also noticed after I close it. All other native non-libreteo emulators like Daphne, JzIntv, and DosBox Staging are stretched to 16:9 even though I have them set to 4:3. 

 

Very odd 

Link to comment
Share on other sites

Slightly related, but unrelated, thanks to some excellent help here I got it working through ArkOS/EmulationStation on my Anbernic RG351V, using TI99sim as the emulator.  

 

It looks really nice portable, though there are some odd concessions you have to make since there's no keyboard (unless you connect one), like calling your player 'P1' in Alpiner, hehe.  Otherwise, about every cartridge game I threw at it seemed to run reasonably well except for Zero Zap.  

 

Tragedy, I know, but I have faith I can get Zero Zap working.  ;)

  • Haha 1
Link to comment
Share on other sites

39 minutes ago, digdugnate said:

Otherwise, about every cartridge game I threw at it seemed to run reasonably well except for Zero Zap.

Certainly, this is a travesty. While I am not one to travel down conspiratorial rabbit holes, I find this to be suspect.

  • Haha 2
Link to comment
Share on other sites

1 hour ago, OLD CS1 said:

Certainly, this is a travesty. While I am not one to travel down conspiratorial rabbit holes, I find this to be suspect.

It's because Milton Bradley coded in sheer awesomeness that was hard for the 994A to interpret.  I suspect, though, that it has to do with the analog controls.   ?

  • Haha 1
Link to comment
Share on other sites

On 1/24/2022 at 3:13 PM, tmop69 said:

 

I think the -f could work only on Windows. Anyway the image looks crips and correctly scaled ("pixel perfect") for your resolution. It looks a little "strange" just because it's setting the whole background to the same blue color, instead of showing black bars on sides. It's a 4:3 ratio, but in a 16:9 screen area.

 

 

I never tried to scale it actually. But it looks like this. You can also make game previews  i had to convert it, i documented it somewhere how i did it, maybe i published it in the dutch magazine TIjdingen.

 

 

20220128_233702.thumb.jpg.8623526d6a18fd92c9f7363ef6630308.jpg

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...