colinpitrat / caprice32 Goto Github PK
View Code? Open in Web Editor NEWAn emulator of the Amstrad CPC 8bit home computer range.
License: GNU General Public License v2.0
An emulator of the Amstrad CPC 8bit home computer range.
License: GNU General Public License v2.0
With caprice using OpenGL mode, pressing F1 to open the menu makes caprice crash.
Stack is the following:
#0 0xb7ace693 in _int_malloc () from /usr/lib/libc.so.6
#1 0xb7acf8f5 in malloc () from /usr/lib/libc.so.6
#2 0xb7f22be7 in SDL_CreateRGBSurface () from /usr/lib/libSDL-1.2.so.0
#3 0x080e236f in wGui::CWindow::CWindow(wGui::CRect const&, wGui::CWindow*) ()
#4 0x080de2b8 in wGui::CView::CView (this=0xbffff778, surface=0x86cb080, backSurface=0x840bd48, WindowRect=...) at gui/src/wg_view.cpp:77
#5 0x08086d12 in CapriceGuiView::CapriceGuiView (this=0xbffff778, surface=0x86cb080, backSurface=0x840bd48, WindowRect=...) at gui/src/CapriceGuiView.cpp:175
#6 0x08057326 in main (argc=1, argv=0xbffffa84) at cap32.cpp:4662
There's no direct call to SDL_CreateRGBSurface in CWindow::CWindow, but CWindow::CWindow calls CWindow::SetWindowRect that calls SDL_CreateRGBSurface.
An example of test that would be interesting to implement is one for the "freezing GUI" issue described as part of issue 11:
#11 (comment)
I tried compiling Caprice32 under MS Windows (Win8 laptop) yesterday night. The experience was far from pleasant :-(
I first tried and install the latest MSYS2 environment from http://www.msys2.org/, install all the relevant packages (gcc, SDL 1.2.15, freetype, zlib, libpng, git make), clone the the git repo and try a plain "make windows". Looks like the WINCXX variable is incorrect and msys2 uses g++ as a compiler. After fixing this, the compilation starts then miserably fail because z80.c redefines _A, _B, etc. which seem to be used by C++ system libraries under MSYS (?).
I then used an old mingw + msys install I had on the same laptop, and could finally build a windows executable after pretty heavy changes to the makefile. My mingw install by itself is a mess with dependencies installed all over the place, and a mix of libraries recompiled from source and binaries fetched from who knows where.
Do you have a working MS Windows compilation environment setup ? If yes could you share it (Cygwin? mingw? msys? msys2?).
We could move away the compilation instructions from the README.md to an INSTALL file - the way it is done in most projects - and make the INSTALL file more verbose about the environment ?
Would it be too much of a hassle if the F1 menu contained an option to enable or disable the joystick via a checkbox?
By default, cap32.cfg, has the joystick enabled and you have to manually edit the cfg file to disable it. This result in multiple arrow characters when the emulator loads since the mouse movements are considered as joystick key presses.
It would also be nice to include a choice of the plus series from the menu (not sure whether this has been implemented yet since I cannot test right now but just got the idea in mind)
Thanks
Currently the only way to load a cartridge is to pass it on the command line.
This should be added to the load/save menu.
When pressing F1 to adjust any settings and pressing Save, caprice32 exits with Segmentation Fault and settings are not saved.
Logs:
segfault at 816b000 ip 080f278f sp bfe97d0c error 4
segfault at 816b000 ip 080f278f sp bfe25f5c error 4
It seems snapshot load & save has been broken at one point.
Caprice is still able to load its own snapshot but other emulators are not (always ?) able to load caprice's snapshot.
Double check with:
http://www.cpcwiki.eu/index.php/Format:SNA_snapshot_file_format
Is there a way to make the 6128 plus ROM to work in caprice32?
I gave a look at winape and there is a file called CPC_PLUS.CPR along with the ROM file.
The AMSTRAD computer I had way back was a 6128 Plus version and it started with a small menu choice:
f1 - Amstrad Basic
f2 - Burnin' Rubber <--- this was a game
Kindly advise.
This would need a screenshot directory to be configured and to exist.
Taking multiple screenshots should be possible.
We have a key free for this: F3
Supporting various file format could be interesting too but we shouldn't had too much dependencies for this.
However, this is low priority because there are other options to take screenshots, I'm not sure having it integrated to the emulator brings a huge benefit.
As stated in #35
There are issues with the configfile. Users have to copy /etc/cap32.cfg to ~/.cap32.cfg first until they can make changes from the ui. Without the .cap32.cfg the emulator does not start. Also a default directory for the caprice snaptshots, etc. files is needed. I created a quilt patch to patch the debian package only to use ~./caprice and subdirectories. But they have to be created manually by the users. Starting caprice does not create them automatically.
~/caprice
parent directory for disk, tape, snapshots, roms ... by default makes senseWould be nice to:
On my french laptop (french keyboard) under MS windows (French keyboard declared in Windows): keyboard mapping is correct. Using an external English keyboard with under an English MS Windows (and setting proper mapping in Caprice32 -> kbd_layout = 0), keys are all wrong, and even the virtual keyboard seems t output wrong characters.
I set model=3 and the cartridge loads correctly.
However, I pressed the drop down from the menu to select a cpc model and then DID NOT select one (just clicked somewhere else) and closed the menu.
Pressed F10 to restart and the normal 128K Basic 1.1 screen loaded.
Took a look at cap32.cfg to find model set to -1.
Previously discussed in issue #11.
In Fruity Frank, the sound behaves strangely on my wife windows. The sound when eating a fruit is monotonic and doesn't stop until another sound (other than the music, usually the purple monster falling) occurs. The sound of the purple monster is also monotonic but does stop when it reaches the ground.
The load/save menu only supports loading .sna for snapshots, .dsk for disks, .cdt for tapes. It doesn't support loading .zip for all these kinds. It doesn't support loading .voc either for tapes.
Moreover, when giving a zip file on the command line, the load menu is broken for the corresponding file type due to xxxx_path being set to the zip file.
The RAM test of Arnold 5 diagnostic ROM is failing with the following message:
RAM ERROR on wave down,
checking normal pattern
Block = C0
Offset = 2C0F
Failing Bit = 07
Is it possible to include the option to flip a disk?
I recently downloaded Untouchables 2 and at one point the game prompted to flip the disk to side B.
Early emulators like CPCE have this option. Was wondering whether it is possible to include it (if not already there and I overlooked it) in caprice32?
Allow user to configure the joysticks from GUI:
It was reported in the past (long ago) that orion prime was not working properly under caprice32.
This issue aims at verifying if this really is the case and if so, find the root cause and fix it.
Reference:
http://www.cpcwiki.eu/index.php/Orion_Prime
There is a problem (maybe?) with the keyboard layout.
In order to type the pipe symbol (|), I have to select English CPC in the Input section. However then all the other keys are badly mapped. Ex: when I press 1, the ! comes and so on.
Then if I select French CPC, the keyboard mappings are ok but the pipe symbol is lost...
Also, I downloaded the Fruity Frank dsk file. Game runs perfectly. However, with the joystick disabled, the keys are mapped to something like the below:
Left: X
Right: W
Up: M
Down: ?
Can the default key mappings be changed when joystick is disabled please?
Thanks
Can there be an option added to enable and disable the joystick from the F1 options menu?
Right now there isn't one (I couldn't find it) and to enable and disable the joystick you have to manually edit cap32.cfg.
I am working to produce a live cd to resemble the Amstrad functionality as much as possible (will keep you posted on this) and I am planning to include caprice32 as an emulator and obviously give you the credit you truly deserve. Like that the novice user would not need to edit config files manually.
Do I have your permission to use caprice32 for this project please? :-)
If sound is disabled, speed limit is also disabled. Culprit code seems to be around line 2423 in cap32.cpp.
Easy to reproduce - launch cap32 with sound disabled.
MS Windows binaries compiled with windows under MSYS2/mingw64 cannot open zipped disk files.
After some investigation, it turns out the zip::extract method creates corrupted files (duplicated bytes here and there in the decompressed file vs the original .dsk).
The exact same routine works just fine under Linux, and probably fine when cross-compiling for Windows under Linux. This is not a big problem, but something that needs a bit of investigation.
User actions that have no immediate visible effect (contrary GUI, fullscreen, exit, reset ...) should display an OSD message.
This concerns:
Starting caprice32 with video driver 'Double size with hardware flip' and switching with the GUI to 'Open GL scaling' on my X1 Carbon, it works but at exit of Caprice32, I have the following core:
(gdb) bt
#0 0x00007ffff6b21735 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff6b2245d in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007fffed0e02aa in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#3 0x00007fffed3b6ffe in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#4 0x00007fffed369763 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#5 0x00007ffff07aa50f in ?? () from /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
#6 0x00007ffff0786bb9 in glXDestroyContext () from /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
#7 0x00007ffff7b7d1d2 in ?? () from /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0
#8 0x00007ffff7b80ffe in ?? () from /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0
#9 0x00007ffff7b8120e in ?? () from /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0
#10 0x00007ffff7b7395e in SDL_VideoQuit () from /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0
#11 0x00007ffff7b4df75 in SDL_QuitSubSystem () from /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0
#12 0x00007ffff7b4e01e in SDL_Quit () from /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0
#13 0x00007ffff6adf1a9 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#14 0x00007ffff6adf1f5 in exit () from /lib/x86_64-linux-gnu/libc.so.6
#15 0x000000000046e7fa in wGui::CapriceMenu::HandleMessage (this=0xba8b60, pMessage=0xb404e0) at src/gui/src/CapriceMenu.cpp:171
#16 0x00000000004ad431 in wGui::CMessageServer::DeliverMessage (this=0x7b3200) at src/gui/src/wg_message_server.cpp:147
#17 0x000000000049d86d in wGui::CApplication::Exec (this=0x7fffffffdd30) at src/gui/src/wg_application.cpp:311
#18 0x00000000004534db in showGui () at src/cap32.cpp:3030
#19 0x00000000004543b2 in cap32_main (argc=1, argv=0x7fffffffe0c8) at src/cap32.cpp:3318
#20 0x00000000004c1025 in main (argc=1, argv=0x7fffffffe0c8) at main.cpp:5
To be noted that the reverse (going from OpenGL to Double HW) results in having only the left half of the screen visible, the right half being black. Not sure if it's related or a separate issue.
It is a minor issue but, for example, while I was in the Input tab with the joystick emulation option ticked and I pressed F7, the checkbox remained ticked but the emulation was disabled as it should.
My point is: Can the menu options be updated in real time so that, for example, in the above scenario the checkbox ticks and unticks if the menu is open?
The system works though. In fact if I close the menu and open it again, the checkbox is unticked then.
Hope I am not asking too much but I am putting myself in the shoes of a noob...
Provide ability to copy files:
Tools like iDSK provide such feature but having it integrated in the emulator would make it easier to use.
It does not happen all the time but sometimes I press F5 and I get a black screen.
The emulator is there but nothing is shown. I know the emulator has loaded since when I press F10, it quits successfully.
Cannot tell what is wrong and have no idea in mind how to, sort of, debug it...
Sometimes also the emulator displays a black screen immediately and does not load. I cannot press F10 to quit which means it is not responding and I am forced to kill it from another terminal...
CPU usage is also high all the time when it is running...
From issue 39:
Hello! First of all thanks a lot for this fine emulator! The CPC Schneider was the very first computer (& gaming device) I had as a kid and seeing that green screen and hearing the Nemesis soundtrack today brings back warm memories ^_^
I'm very sorry I'm writing this here because it doesn't really belong here... though maybe it kinda does because I could really not find any place on the net where there was discussion about this emulator (apart from very outdated ones); there doesn't seem to any forum or discord or any other place to ask questions.
What I wanted to ask is if it's normal that I'm only getting around 17 FPS (34%), even when not running a game. Disabling sound seems to double that but nothing else brings emulation to 100%. Maybe there's some kind of setting I missed or something? (My PC is quite strong).
I actually used Caprice32 one or two years ago and I think I remember that I didn't have any speed issues back then. Now that I found more of my old games I'd love to play them but yeah, the speed kinda kills the fun.
Sorry again for posting this here, thanks a lot and it would be great if you could help me a little here :)
Hello Mr. Colin,
Your fork of Caprice32 has recently been accepted and added to the repositories of Solus OS, due to being the only Linux Amstrad CPC emulator that is actively maintained.
I've been trying it out for the first time, and I must admit it's rather arcane to use from a novice's standpoint.
Would it be possible for a short guide to be written on how Caprice32 is used? For instance, I cannot for the life of me figure out how to type a " in it, which from what I gather is needed to run Disk games.
And if this guide is written, would it also be possible to add it as a menu entry in the menu dialog from pressing F1?
Thank you for your time, and for maintaining this emulator! ^_^
The only way to modify settings persistently is to edit cap32.cfg
It would be expected that settings updated from the GUI are kept persistently or at least that there's a way to overwrite the cap32.cfg with it.
Building a first time with DEBUG=1 should ensure the next build are also in DEBUG even without the flag provided.
Only a make clean should revert to the normal build mode.
There is no packets for major distribution like debian, ubuntu ...
The only existing one is for ArchLinux.
Would be nice to provide some.
Detecting the clicked (or hovered ?) pixel and setting the light pen input high when the CRTC reaches it:
http://www.cpcwiki.eu/index.php/Trojan_Light_Phazer
Caprice32 currently burns 100% CPU, whatever the host machine. Most of those CPU cycles are wasted in the main loop waiting for the emulated CPU to do something.
Besides optimizing CPU usage in general, this is actually required if one wants to usie Caprice32 as a screensaver.
Provide a tool allowing to:
Currently, the build for windows is not maintained and is probably not working anymore.
The windows makefile should be removed and the build for windows should be done from the main makefile using cross-compilation.
Validation for it should be added on travis
The GUI (and caprice in general) should be fully usable without mouse.
After all, the best platform ever (the CPC) didn't require a mouse.
The first (and maybe only) step is to implement proper focus handling (tab
and shift-tab
).
Hi
Is that possible to add autorun ?
Ex : ./cap32 'renegade.dsk' to play directly.
Thank.
I played a bit Fruity Frank and when I quit the emulator, in the terminal there were a lot of messages like the below:
ALSA lib pcm.c:7963:(snd_pcm_recover ) underrun occurred
Is that something that can be fixed from caprice32 or shall we just ignore it since it is something ALSA related?
In options GUI, there is no way to activate joystick emulation.
Because the target-specific variable DEBUG is defined after the global variables have been assigned
The way Caprice32 handles dsk/cpr and friends is... strange.
We seem to derive drvXXX_path from the arguments (if any), then reuse it. And the code is pretty redundant here - as indicated in the comments !
We could handle it more sensibly, the way other emulators do it:
In VirtualBox, loading the cartridge (model=3) with joystick enabled results in a series of continuous beeps as if I am pressing the joystick buttons. The beeps are gone once the joystick is disabled (hence my suggestion earlier to be able to disable the joystick via the menu)
Also, having no joystick and operating a laptop, I could not find a way to play Burnin' Rubber. Only F and G keys work and I have no joystick controls. It would be nice if there was a way to map arrow keys to joystick directional controls and any other 2 keys to joystick buttons. I think this is doable since I saw another other emulator (I guess it was WinAPE) that managed to achieve such an option. What do you think?
Is it too much of a problem? Hope I am not bugging with all these issues but I am being your personal tester :-)
Before pulling the recent update (about the support for the plus versions), I was able to run the emulator without the X server running.
The emulator would load and display as the below. (Note the error at the top).
This did not happen with previous versions. It would quit with a message that no display was found (along those lines).
Kindly advise.
This is the auto_pause option that is currently unimplemented.
I guess this may have some value but unless someone asks for it, this is low priority ...
When modifying the screen style from the option menu (Options->Video->Video plugin->Half size/Double size) the display is screwed-up.
Two issues in one:
This would be so much better for media-centers and game boxes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.