Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the plus range (6128+, 464+, GX4000) #15

Open
bert003 opened this issue Jul 16, 2016 · 35 comments
Open

Support the plus range (6128+, 464+, GX4000) #15

bert003 opened this issue Jul 16, 2016 · 35 comments
Assignees

Comments

@bert003
Copy link

bert003 commented Jul 16, 2016

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.

@ColinPitrat
Copy link
Owner

I do want to support the plus range (6128+, 464+ and GX4000) but this is a different hardware than CPC so a lot of work is needed to support it. This will not happen quickly. I already started to work on the design part for it but no code is written yet.

As no issue is opened for it yet, I'll use this one to follow the progress, this will allow you to be aware when it finally arrive !

@ColinPitrat ColinPitrat changed the title Use the 6128 Plus ROM Support the plus range (6128+, 464+, GX4000) Jul 16, 2016
@ColinPitrat ColinPitrat self-assigned this Jul 16, 2016
@bert003
Copy link
Author

bert003 commented Jul 16, 2016

That's great. Awaiting eagerly 👍

Thanks for all your work in caprice32

@ColinPitrat
Copy link
Owner

For information, you can follow the progress of this by manually putting model=3 in cap32.cfg.
Don't expect much for now however :-)

In the menu, F1 and F2 can be activated using the numpad, which corresponds to a CPC keyboard if you remember well: http://www.nightfallcrew.com/wp-content/gallery/amstrad_cpc_464_plus/img_1592.jpg

If you don't have a numpad (typically on a laptop) you can usually access it through function keys. It's also possible to access it with the virtual keyboard if you have a joystick (activated with button 10 of the joystick by default).

@bert003
Copy link
Author

bert003 commented Jul 19, 2016

Thanks ... will do that :-)

I did not understand the last sentence though... Virtual keyboard? In caprice32 you mean?

And what is button 10 of the joystick?

@ColinPitrat
Copy link
Owner

Yes in caprice 32 there is a virtual keyboard to allow using it without keyboard (typically if you want to use it on a media center with joysticks).
The button 9 of the joystick shows the GUI and the 10 show the virtual keyboard.

Here is how the buttons are numbered on most joysticks (but some have less, that's why it can be configured in cap32.cfg):
http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad_diagram.png

@bert003
Copy link
Author

bert003 commented Jul 19, 2016

Did not know that.

How can they be configured from cap32.cfg? I see no entry for joystick buttons. Am I missing something please?

The joystick I had way back was something like this: http://www.nightfallcrew.com/wp-content/gallery/amstrad-cpc-6128-plus-monitor-mm12-white-phosphor-crt/IMG_0554.jpg

It had just 2 red buttons and arrow keys

@ColinPitrat
Copy link
Owner

Yes the CPC only supports 2 buttons for joystick but as most modern joysticks have much more than that, it's the opportunity to use the rest to control the emulator.

For now there are only two configurable buttons:
joystick_menu_button=9
joystick_vkeyboard_button=10

Once in the GUI or vkeyboard, arrows are usable to move in the GUI menu and in the keyboard. The following buttons are not configurable:

  • 1 activate GUI controls (same as pressing Return)
  • 2 and 5: switch to next control (same as Tab)
  • 3 and 6: switch to previous control (same as Shift+Tab)
  • 4: Close current window (same as Escape)

All this would really need to be documented somewhere :-)

These controls work pretty well with the two joysticks I have but feedback of experience with other joysticks would be nice as it's difficult to anticipate all the configurations that could exist.

@bert003
Copy link
Author

bert003 commented Jul 19, 2016

When I added the lines above in cap32.cfg, keyboard went crazy.

When I press a letter, it is typed multiple times ex: cls would be ccccccccccccclllllllllllllsssssssssss

Also, being on a laptop, how do I display the virtual keyboard without having a joystick please? Since f10 means quit for example...

@ColinPitrat
Copy link
Owner

That's strange ! Looks like an interesting bug :-)
There's no way to display the keyboard without a joystick for now, I made it with only joystick in mind. I could easily add a shortcut however.

@bert003
Copy link
Author

bert003 commented Jul 19, 2016

That would be great as the keyboard is obviously a standard input device unlike the joystick :-)

Thanks for all your work. Awaiting updates to pull with git ;-)

@ColinPitrat
Copy link
Owner

Yeah but the virtual keyboard isn't supposed to provide more keys than the keyboard.
Until I found a laptop without numpad emulation :-)

@bert003
Copy link
Author

bert003 commented Jul 19, 2016

I thought the virtual keyboard somehow resembled the traditional amstrad cpc keyboard layout. Never knew there was this feature in caprice32 and am looking forward to see it in action :-)

@ColinPitrat
Copy link
Owner

ColinPitrat commented Jul 20, 2016

I just added it.
You can show it with Shift+F1.
You may be a bit disappointed, it's not very beautiful :-) But I have plans to improve it

@bert003
Copy link
Author

bert003 commented Jul 20, 2016

It is not working. I just recompiled caprice32. Emulator loads however when I press F1 or Shift+F1 the below happens:

error

I have sound however since pressing backspace at the beginning of the line produces the beep.

Kindly advise... thanks

@ColinPitrat
Copy link
Owner

The error message and the fact that it crashes are pretty bad, I need to improve this.
The issue is probably that the font files are not found. They are in resources subdirectory. Where does /home/cpc/caprice32/cap32.cfg points to for resources_path ?

Typically from a fresh clone of github:
$ grep resource cap32.cfg
resources_path=./resources

which means that if you don't launch cap32 from the directory it's in, it will fail with this.
I just improved the commit message and fixed the crash. So now in the same situation, the GUI isn't display and there's an error message in the console. It's not perfect because you can easily miss it if you don't look at the console but that's still better than crashing.

@bert003
Copy link
Author

bert003 commented Jul 21, 2016

Recompiled caprice32 and now the keyboard shows. I like it in its simplicity :-) good job

However if I show the keyboard and close it without typing anything I get typed in BASIC.

Is that a bug please? Thanks

@ColinPitrat
Copy link
Owner

ColinPitrat commented Jul 21, 2016

It looks like a bug. I don't observe it.
You just press Shift+F1 to show the keyboard and then Escape to close it and it inputs "BASIC" ?
With some changes in cap32.cfg ?
"BASIC" is not a random string and yet it doesn't appear anywhere in the source code of caprice (except as comments).

@bert003
Copy link
Author

bert003 commented Jul 21, 2016

Sorry I made a typo in my last comment.

Forgot to use the code tag and the text was hidden since it resembles a tag.

I wanted to write that it types <bitmap> in BASIC when I click the close button at the top right of the virtual keyboard. Did not try with pressing ESC.

I suspect it is returning the object clicked.

@ColinPitrat
Copy link
Owner

Oh yeah, it types <bitmap> right ?
That is a bug indeed ! :-)

@ColinPitrat
Copy link
Owner

Fixed !

@bert003
Copy link
Author

bert003 commented Jul 21, 2016

Thanks a lot... Works like a charm now :-) I like it...

@ColinPitrat
Copy link
Owner

Significant progress on Plus support: colors, split screen and raster interrupt.
This gives a nice improvement on Burnin' Rubber menu screen (only the sprite support is missing to have it fully working I think).

@bert003
Copy link
Author

bert003 commented Jul 24, 2016

I just pulled the recent updates, compiled and ran it and it did not load.

Instead it exits with a Segmentation Fault. No more messages are written.

Before the recent updates, setting the model number to 3 results in the emulator not loading and quitting with the following message:

ALSA lin pcm_dmix.c:996:(snd_pcm_dmix_open) unable to create IPC semaphore
Using configuration file: /home/cpc/caprice32/cap32.cfg
Could not open audio: No available audio device
audio_init() failed. Disabling sound.
Load of cartridge failed: Aborting

@ColinPitrat
Copy link
Owner

ColinPitrat commented Jul 24, 2016

Do you have the file system.cpr in your rom directory ? The Plus do not have a ROM anymore, the cartridge replaces it. I therefore ship the default cartridge (with basic + burnin' rubber) as 'system.cpr' in rom directory.

I tracked and fixed the last bug that was preventing burnin' rubber to be playable, so if you manage to load it you can give it a try. There are still some features missing (DMA sound which is why some effects are missing in burnin' rubber and others that are not used in burnin' rubber but are used in other games: some interruptions, smooth scrolling ...). By the way, playing it with libcaca is fun ! The result is quite good :-)

You can give a try to other games, a few of them seems to be working but you may spot some issues:
http://www.cpcmania.com/GX4000-Games/Games.htm

These ones seem to work (other may, I didn't test all of them, but some do not even start):

  • Barbarian
  • Batman
  • Burnin' Rubber
  • Klax
  • Robocop 2
  • The Enforcer

@bert003
Copy link
Author

bert003 commented Jul 25, 2016

I completely removed the directory, cloned a fresh copy, compiled, changed model to 3 and still I get the Segmentation fault error.

With model=2 everything works perfectly now. It used to also fail with Segmentation fault since I had an old cap32.cfg.

However now, the fresh copy, with model=3 still fails with segmentation fault.

@ColinPitrat
Copy link
Owner

OK, I can reproduce it.
If you build in debug it works just fine but in release it crashes.
You can give it a try with make clean and then make DEBUG=1.
I'll check what's wrong.

@ColinPitrat
Copy link
Owner

Bug found and killed.

@bert003
Copy link
Author

bert003 commented Jul 25, 2016

Cheers :-) I'll post more updates if I find more bugs while I am testing...

@ColinPitrat
Copy link
Owner

I just commited the support for soft scroll. I also did a few enhancement in the past weeks including a fix around the unlock sequence that fixed many games. The games that I found to NOT work are:

  • No Exit
  • Pang
  • Pinball Magic
  • Switchblade

The other ones seem to work. A special case for Skeet Shot that requires the phazer. Thinking about it, this should be possible to emulate it with a mouse, not sure if this would be fun. I open a separate issue for this.

Remaining plus features to develop:

  • Sound generator DMA support
  • Vectored interrupts
  • Analog joystick support
  • 8 bit printer support
  • Verify read of write-only & unmapped registers

There's also another bug to track down. In some games (seems to happen systematically in Crazy Cars II, I observed it once in Dick Tracy), the emulator get partially stuck (image continue to be updated but keyboard is not active and sound is looping) and it seems that this isn't fixed by a reset or loading a new cartridge.

Apart from that this should work relatively well. Don't hesitate to provide feedback. Apart from DMA (which means some sound effects are missing) the missing features shouldn't be widely used.

@bert003
Copy link
Author

bert003 commented Aug 8, 2016

Hi, I recompiled the latest copy.

Emulator seems to work fine. However the numbers on my laptop are being ignored and I can only type letters in BASIC.

I tried different combinations of CPC Language vs Keyboard with no luck. I even tried a different model.

If I am not mistaken, this issue was not present earlier. Or maybe I forgot to test for it after one of the updates... can you please check?

@bert003
Copy link
Author

bert003 commented Aug 21, 2016

Hi... any updates on this please? thanks

@ColinPitrat
Copy link
Owner

On my side I don't have the issue you describe with the numbers not working.
I tried on 3 different computers. I need to add some logging around keys handling and to ask you to reproduce then to have more info.

@FloLore
Copy link

FloLore commented Dec 13, 2017

Hi ColinPitrat,

I tested a lot of game on the "CPC Plus" configuration of the emulator and it works well. However "RoboCop II" has a display bug (Sprites) on the loading screen between levels, but it works while "Fluff" and "Prehistoric II" crash after the introduction.
Do you think a solution could be found?

@FloLore
Copy link

FloLore commented Dec 25, 2018

Cartridges :

Floppy disks :

Burnin' Rubber, Mystical, Stryker in the Crypts of Trogan, Super Cauldron, Switch Blade and Tintin on the moon, work perfectly !

Best Regards,

FloLore

@ColinPitrat
Copy link
Owner

Had a look at Robocop. With verbose log, I get the following log around the time of the display issue:
DEBUG src/asic.cpp:319 - [UNSUPPORTED] Received interrupt vector: 254

This is the part described here:
http://www.cpcwiki.eu/index.php/Arnold_V_Specs_Revised#Interrupt_service_.28Vectored_interrupts.29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants