News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Gryzor

CapriceRPI2

Started by Gryzor, 09:20, 13 March 15

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Beaps

I updated my Pi last night etc and Caprice Emu is really crackerly sound?


The original cpc emulator plays fine?

KaosOverride

For compiler addicts,  functional  SNA save menu (unfinished) updated at GitHub
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

KaosOverride

#52
Re-update at GitHub and binary/src upload at MEGA folder of the Pre-release

Added fastload snapshot option, finished save snapshot option

Added --tapeturbo command line option for disabling tape turbo loading

How does save/fastload SNA work?

I have made an SLOT style system, where the emulator takes the DSK, CDT or SNA filename and generates a FILENAME_MEDIA_NUMBER.SNA filename for the new SNA. For this, tries to create a SAVE folder into ./SNAP folder, if not, tries ./SAVE folder.

Example, you load BATMANMOVIE.DSK so the slot filenames will be BATMOVIE_DSK_XX.SNA where XX is between 00 and 04 (5 slots)

With the save option, existing slots will be shown, and you can overwrite.

With fasload option, will use the loaded DSK, CDT, SNA filename to show only the slot SNA for that file.

Typical situation:

You load the BATMOVIE.DSK, play some time and thn you want to save, use the option and f there are allready slots used, will be shown, if there are slots free, NEW FILE... will be shown to create a new slot. Then you exit the emu.

Next day, you load the BATMOVIE.DSK and use the fastload option, the slots for the DSK will be shown, select and continue your game!!

you can use normal load option to enter SAVE folder and select ANY slot for ANY file  :laugh:
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

Beaps

still loads at 100 miles an hour  ???

Is this right?

cpc="/opt/retropie/emulators/cpc/cpc4rpi %ROM%"
CapriceRPI2="/opt/retropie/emulators/CapriceRPI2/./capriceRPI2 --tapeturbo %ROM%"
default="CapriceRPI2"

KaosOverride

Oh my God... is --notapeturbo  :-\
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

KaosOverride

And finaly... V1.0!!!

Some little cleanup, minor aditions, and it's ready!!!

Also I have make support for 32bpp color mode, people asked for, so they have now  :D

Source at GitHub and Mega folder.

Executable at Mega, with static SDL DISPMANX or dynamic (Raspbian is supposed to adopt DISPMANX SDL as the official) :D

Also, renamed to CapriceRPI, no more CapriceRPI2

GitHub:
KaosOverride/CapriceRPI · GitHub

Mega:
https://mega.co.nz/#F!qctQXKiI!oPgeSUzDj6rN_1GAPFbe4A
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

PHabermehl

KaosOverride, you're my HERO  ;D ;D ;D ;D

Just compiled it under OpenSuse 13.1 and it works (even with 32bpp)

I'm so happy because I just had an accident being unable to walk for some days, so I can give a meaning to all the free time I have now!

CPC, here I come!


KaosOverride

Yes but... does it detect as RPI1 or RPI2? At other hardware that is not an RPI, you have to tweak at cap32.cpp the call to WhichPI(), where is compared with 128. Change 128 to 0 and should work forcing RPI2 mode.

By the way, do you have any kind of magenta or pink glitch at the menus?

I broke my Achiles some months ago and stay some time without walking, I now what is that.... Now I'm at recovery, fortunately and I hope to be back for work at this month end.
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

PHabermehl


[ot]Oh well ... then get well soon, too!


For me, it was the quadriceps filament in my left leg.......
[/ot]


Yes, I do have the magenta background on the two menu items left and on the two right. only the one in the middle is okay. But ... it all works, so I don't care much...


I changed the WhichRPI() in menu.c to always return 129 as you recommended, so I think I'm fine, right?


Oh, and one more thing, the fullscreen on my hd display does not respect the aspect ratio - looks, well, not so good. Any chance of forcing 4:3 with black or (system color / green / whatever) border?


Aw, don't mind, I'm sooo happy, because this CPC emu now has a GUI and runs Kong strikes back in split screen mode perfectly!


Thanks for your work!


Peter


PHabermehl

Oh, one more serious question:

on German keyboards, we do have the "QWERTZ" layout. Many games that need the "z" and "x" keys are hard to play because "y" and "z" are swapped...

Any chance to solve this Caprice-internally (an option "swap y and z keys" ?

Thanks,
Peter

KaosOverride

There are some options at Caprice to mod the firmware rom to support different keyboard layouts, but are unused at CapriceRPI.

I think that can be added an option for keyboard layout change at the menu, and a command line option for the emulatorstation launcher to change default UK to other. But I have to make different layouts for virtual keyboard :( Also I remember only mod rom for FR and SP keyboard, so german has to be added.

I have also detected some fails at the autorun functions, so filenames of 8 chars are only filled to 7 :(

I will add that 2 things to the To Do list, sure :)
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

PHabermehl

I think there was never a German CPC keyboard, it was identical to UK. My concern is just that the host keyboard is German, thus "z" and "y" are swapped in comparison to the UK CPC layout, making it impossible to play many games - I tried one of my all time favourites, "Thrust", where you can't redefine the keys and need "z" and "x" for rotation of the space ship....



KaosOverride

V1.1 with bugfixes

-Hope to solve the transparency at the GUI at 32bpp
-Fixes to the Autoboot system
-Extra makefile for compiling at not RPI devices (take care to make clean first  then do make -f makefile.notpi)

Sorry but until next week I cannot prepare a binary package, this is going to be a long weekend for me... Only GitHub update...

For the German keyboard I have some kind of fix only for console input, not X11

sudo apt-get install console-data

Then when asked, selewct not to change the actual keyboard layout

So everytime you want to run CapriceRPI at the text console, you have to do:


sudo loadkeys /usr/share/keymaps/i386/qwerty/uk.kmap.gz

./capriceRPI

sudo loadkeys /usr/share/keymaps/i386/qwertz/de.kmap.gz

This is a host keyboard issue, but also some kind of patch can be done at Caprice with time. I will also take a look for FR and SP keyboard support for the future...  ;D
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

PHabermehl

Sir, sorry for being a little pedantic, but ... Github v1.1 does not contain the makefile.notpi

KaosOverride

Pedantic? O no!! Is my mistake!! Now it should be OK :)

GitHub only uploaded "known" filenames, I forget to add the new files!! :-X
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

PHabermehl

Ok, now it worked all fine!

Thank you and have a nice weekend!


KaosOverride

Great!!


By the way, did the keyboard reconfigure tip work for you? It's taken fro a PC Linux forum but did work at my RPI. It swapped the Y and Z keys  :)
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

PHabermehl

Yes, the keyboard trick worked on my Linux machine - haven't tried it on the RPI yet, because I finally gave a joypad to my daughter (officially, it's her RPI, for education only)  :-)

Higgy

First off - 8) KaosOverride  Thanks for doing this great work on the RPi

I have been trying it for the last couple of days. I did not have a CPC back in the day  :o , I had a Spectrum but my wife had a CPC.  It is great fun going through the old games and remembering good times.

I have a suggestion, is it possible that once you are in the game/rom folder, holding down on the joystick scrolls through the list? At the moment you have to keep pressing/tapping the joystick button to scroll down (I get tired before even playing a game  :D )

I see Page Up/Down works on the keyboard so that is great.  Also is there a config file so that it auto goes to a pre-defined folder? (e.g. /home/pi/roms/cpc/ This would be handy if/when this great work gets integreated into RetroPie.

Can you also put the 'version number' on the capriceRPI splash screen please. I don't know how to check which version you are running otherwise.

Some info to help people:

I installed this onto a FRESH Raspbian image 5/5/2015 I think (the latest). First of all I installed the improved SDL files. Instructions here:

https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=99822

But then I got compile errors when trying to build capriceRPI:

menu.c:20:21: fatal error: SDL_ttf.h: No such file or directory
menu.c:21:23: fatal error: SDL_image.h: No such file or directory


Sorry not the best way, but I fixed the issue by:

sudo apt-get install libsdl-ttf1.2*

And I installed SDL_image-1.2.12.tar.gz (download off the main SDL website - Index of /projects/SDL_image/release ) but SDL_image.h was installed into the wrong place, so that needed moving:

Problem was SDL_image.h was being looked for in /usr/include/SDL but it was installed in /usr/local/include/SDL.

Once this was moved I did 'make' and it all worked great  8)

Thanks,

Higgy


KaosOverride

#69
Long time ago, at the GP2x times, there was some code to try that, when you keep pressed it advanced more kickly the list, but I changed to the page up and down model using the left and right triggers of the handheld. This was remapped to the Page up and down at the keyboard.


Also I am considering the left-right joy dir. selection idea a bit wrong because when you use up and down dir. for selecting options you can accidentally press left or right... And that function is repeated with the fire buttons.


All this was intended like a "phase 2" at the menu reworks. Phase 1 was done with the new options layout plus driveB use and snapshot saving system.


Caprice RPI tries to not depend of external files, this goes with firmware ROM files, GUI resources and the default config. Its mandatory for easy integration in frontends. But you can do an script to do the trick. The file load path is configured from where you run the emu, not from where the emu is. So this should work


Script idea:


cd /where/your/dsk/cdt/sna/are
/where/you/have/capriceRPI


You don't need the disk tape snap folders, if they are not at the folder from where you execute  the emu (not where it is located) then that folder will be used as the "top" dir. Yes, it is sandboxed to that directory, this was ideal for the GP2x handheld, to not exiting the sd card.


In my case, using it as a cpc4rpi replacement I found at the filemenus the retropie cpc folder with all the dsk and cdts, and if you have write rights then the save folder for snapshots will be created and used.
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

Higgy

Many thanks I got that all working  ;D Goes straight to my /home/pi/roms/cpc folder

Now I have an autobooting set-up that goes to a basic text menu with:

Amstrad CPC - capriceRPI
Commodore C64 - VICE
Sinclair Spectrum - ZEsarUX

I will add some additional 8-bit computers. I hope now to add a start-up IMAGE/movie and look at using AdvanceMENU to start games from a list.

It might be useful to add in your notes/readme that you need the following items installed if building on a fresh Raspbian install:

SDL_ttf-2.0.11
SDL_image-1.2.12

Thanks again.


Higgy

Is there some problems with Autoload?

I've been using CapriceRPI for a bit now on different games, and first of all Autoload would work:

Select game under 'Load Disc' then press joystick left and Run"... etc appeared and the game loaded.

Now it does not seem to work. Sometimes just a R appears instead of Run"...

Also any way of mapping commands e.g. virtual keyboard to joystick buttons? I have a USB Competition Pro (4 fire buttons) and one as default is fire, and another is Caprice MENU, but would be nice to use the other 2.

Thanks

KaosOverride

What version are you using? Latest GitHub compiled? I will try tomorrow to update the MEGA folder mirror also with precompiled binaries for RPI 1 and 2.


The "only an R" with autorun may be because an input device is simulating keystrokes, but it's a very rare case...


The joy buttons are mapped from Joy 1 to 3, to the 3 fire buttons of the CPC. The 4 to  6 are to menu open, virtual keyboars and OSD info. Fire 2 and 3 from the real joystick should be usable under the emulation. Fire 2 is blocked for redefine options at many games (Why?? Its usefull to allow it, but they did the games that way...) But the undocumented fire 3 can be used at the redefine options for secondary fires or other options.


I tried to make the joystick code the most generic. Analog axis and the first 6 joy fires. Most USB pads emulate the analog axis and the fires 5 and 6 are not so important options (vkeyboard and OSD info) so 4 fire joysticks are very usable.


I have two PS2 like USB pads with switchable analog/digital pad, and worked fine with the analog control and the directional pad in analog mode.


I don't think there is need to remap keys to fire 2 and 3 as a general case, maybe very very few games force you to use a key from keyboard and don't allow to redefine it to Fire 2 or 3...
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

Higgy

Hello,

I compiled v1.1 from GitHub.

Just to clarify Autoload:

1. Turn autoload option on.
2. Select .DSK file.
3. Move joystick 'left' when highlighting Load Disc text
4. Command Line screen should appear and Run"... appears?

I have just tried. Sometime I can get an 'R' but most of the time just a normal blank command line screen.
It was working once I first started using Caprice. Maybe I am doing something wrong?

Also I just tried a cheap USB PS3 copy, but the D-Pad does not work and the Analogue stick is too difficult to select menu items, it jumps about. I will try another pad.

Thanks

PHabermehl

No news for such a long time?

Hope, you're okay, KaosOverride!


Powered by SMFPacks Menu Editor Mod