CPCWiki forum

General Category => Emulators => Topic started by: Maskedman on 21:33, 10 November 12

Title: CPC on the Rasberry Pi
Post by: Maskedman on 21:33, 10 November 12
Hello guys,


I was wondering if any of you had any experience with running any kind of CPC emulator on the Rasberry Pi?


Thomas
Title: Re: CPC on the Rasberry Pi
Post by: arnoldemu on 11:50, 12 November 12
Hello guys,


I was wondering if any of you had any experience with running any kind of CPC emulator on the Rasberry Pi?


Thomas
yes, I ran my own ones ("Arnold") and they were a bit slow. When I have some time I will optimise them for Pi.
(I have a Pi now :) ).
Title: Re: CPC on the Rasberry Pi
Post by: Gryzor on 12:36, 12 November 12
This would be really fun. I also got an arcade-style joystick (replica of the one I used back in the day with the CPC )and a USB adaptor I'm itching to try!
Title: Re: CPC on the Rasberry Pi
Post by: Maskedman on 10:53, 15 November 12
This would be really fun. I also got an arcade-style joystick (replica of the one I used back in the day with the CPC )and a USB adaptor I'm itching to try!


Exactly Gryzor, I forgot to mention that I had one of those too!


Guess the only mod needed would be to make a Pi case out of Harrier Attack  ;D
Title: Re: CPC on the Rasberry Pi
Post by: Gryzor on 14:15, 15 November 12
Ohhh that's a fantastic idea! Why Harrier Attack though?
Title: Re: CPC on the Rasberry Pi
Post by: Maskedman on 14:17, 15 November 12
Funny you should ask, I was trying to think of a game that was well known for all CPC owners...


What other suggestions do you have?  ;D
Title: Re: CPC on the Rasberry Pi
Post by: Bryce on 14:19, 15 November 12
Oh Mummy, or any of the Roland titles?

Bryce.
Title: Re: CPC on the Rasberry Pi
Post by: Gryzor on 14:20, 15 November 12
Problem is those cases are not easy to drill holes into, are they?
Title: Re: CPC on the Rasberry Pi
Post by: Bryce on 14:23, 15 November 12
Yes, they tend to be very brittle and crack if you just look at them the wrong way. Heat it to about 50°C if you intend drilling it.

Bryce.
Title: Re: CPC on the Rasberry Pi
Post by: Gryzor on 14:41, 15 November 12
Oven?
Title: Re: CPC on the Rasberry Pi
Post by: Bryce on 14:49, 15 November 12
Well the fridge is hardly going to be of any help, so yes. :D

Bryce.
Title: Re: CPC on the Rasberry Pi
Post by: Gryzor on 15:08, 15 November 12
Fridge, oven, microwave... so many options in my kitchen, always mix them. Doesn't help they're all brushed silver-plated.

How do you do it? What do you put the tape on? bottom of the oven?
Title: Re: CPC on the Rasberry Pi
Post by: Maskedman on 15:12, 15 November 12
Well, that escalated quickly!  :P
Title: Re: CPC on the Rasberry Pi
Post by: Bryce on 15:52, 15 November 12
In an oven you have to be careful, because the metal (especially the grill rail) gets a lot hotter than the oven reports to be and the plastic will stick or deform around the metal. the safest way is in water, which is much easier to measure the exact temperature and the plastic will float freely. You can of course use the microwave to heat the water, but don't put the plastic in until you've taken the container out of the microwave.

Bryce.
Title: Re: CPC on the Rasberry Pi
Post by: Gryzor on 15:55, 15 November 12
Yeah, that's why I asked, thermal capacities and whatnot, how do you do it safely? The water is a great idea! And, I guess at 50 degrees no actual damage will be done even if you let it soak forever...
Title: Re: CPC on the Rasberry Pi
Post by: Maskedman on 15:55, 15 November 12
My Pi is on the way, but would it even fit in the case?
Title: Re: CPC on the Rasberry Pi
Post by: Gryzor on 15:58, 15 November 12
Don't have a tape case with me since I left my walkman at home, but the Pi is about 2cm high...
Title: Re: CPC on the Rasberry Pi
Post by: beaker on 16:53, 15 November 12
Looking at mine I think you may have problems with the height of the USB and LAN sockets on the Pi.
Title: Re: CPC on the Rasberry Pi
Post by: Maskedman on 16:57, 15 November 12
How about the slightly bigger black cases, like the one Bruce Lee came in?
Title: Re: CPC on the Rasberry Pi
Post by: Gryzor on 17:00, 15 November 12
...or Samantha Fox? :D
Title: Re: CPC on the Rasberry Pi
Post by: Maskedman on 17:04, 15 November 12
Hahah - guess we know where to put the volume and errhh...brightness knobs?  ;D
Title: Re: CPC on the Rasberry Pi
Post by: Gryzor on 17:10, 15 November 12
It's extensible enough - you could add a little speaker and make it play a Sam song every time you open the case or something.
Title: Re: CPC on the Rasberry Pi
Post by: khisanth on 23:54, 19 November 12
My two are constantly being used for different things, would love to get a CPC emulator going on one and somehow get it into some Amstrad hardware
Title: Re: CPC on the Rasberry Pi
Post by: Gryzor on 17:25, 20 November 12
Quote from: khisanth
and somehow get it into some Amstrad hardware
This would be lovely, but use them for what purpose?
Title: Re: CPC on the Rasberry Pi
Post by: khisanth on 17:41, 20 November 12
No idea actually!  ::)

Maybe try and interface with the keyboard and use the Pi as the computer. Really it would just be the fun of it and get some use out of broken or not working hardware.
Title: Re: CPC on the Rasberry Pi
Post by: beaker on 18:32, 20 November 12
Maybe the Pi could be used to operate some sort of robotic operating buddy so then once again I'd have someone to control the second player in Target Renegade or Bubble Bobble like all those years ago... Now I have to make do with single player  :'( ;D
Title: Re: CPC on the Rasberry Pi
Post by: steve on 21:14, 20 November 12
I might be good to install a raspberry pi for speech recognition, connected to the keyboard matrix.
Title: Re: CPC on the Rasberry Pi
Post by: khisanth on 21:40, 20 November 12
Now I am liking that idea a lot !

 ;)
Title: Re: CPC on the Rasberry Pi
Post by: Gryzor on 17:41, 21 November 12
Maybe... control... a turtle?

Oh wait.
Title: Re: CPC on the Rasberry Pi
Post by: Optimus on 13:35, 23 November 12
CPC emul for Pi would be fun! And doable. I already have some on my mobile phone and my Gamepark Caanoo which as far as I know is slower than Pi. I think it has a port of Caprice.


And yes, finally I decided to order my Pi among with friends, we order 4 PIs in one package so that we divide the postal costs.
Maybe I will get it in December. Let's see!
Title: Re: CPC on the Rasberry Pi
Post by: Gryzor on 17:39, 23 November 12
If you follow their Twitter account, every now and then they retweet from shops that have stock... ust today I was reading about a shop that went from 1500 units down to 300 in one day!
Title: Re: CPC on the Rasberry Pi
Post by: robcfg on 22:27, 23 November 12
After waiting for 4 months, my Pi is on the way home!


The good thing is that I get the new 512MB model, can't wait to start playing with it!
Title: Re: CPC on the Rasberry Pi
Post by: Gryzor on 22:05, 24 November 12
Yeah, damn, and I'm stuck with 3x256MBs. Bastards!
Title: Re: CPC on the Rasberry Pi
Post by: Bryce on 22:15, 24 November 12
Yeah, damn, and I'm stuck with 3x256MBs. Bastards!

Add the second 256MB yourself.

Bryce.
Title: Re: CPC on the Rasberry Pi
Post by: arnoldemu on 12:07, 26 November 12
Add the second 256MB yourself.

Bryce.
you can't the ram either sits on top of the soc, or it sits below it.
they are in a stack on the pcb.

I'm not sure there is another way to add ram.
Title: Re: CPC on the Rasberry Pi
Post by: Gryzor on 12:40, 26 November 12
Yup, from what I've read you can't do it. Not like there's an extra socket or you can piggyback some extra RAM...  :(

Title: Re: CPC on the Rasberry Pi
Post by: Bryce on 14:04, 26 November 12
That's a pity. (Glad I hadn't ordered one yet :) )

Bryce.
Title: Re: CPC on the Rasberry Pi
Post by: Gryzor on 21:49, 27 November 12
Grrr. Maybe I could chain two of them? Dual CPU, double the memory :)

Title: Re: CPC on the Rasberry Pi
Post by: Marq on 11:10, 28 November 12
The current SDL implementation on the Pi is just bad and slow, so a bit of fiddling with OpenGL ES would be needed. I made a few experiments with it and streaming the 2D buffer to a texture makes things an order of magnitude faster. If nothing else, it's straightforward to use the VideoCore for scaling for fullscreen. SDL only supports 16-bit color on the Pi IIRC.
Title: Re: CPC on the Rasberry Pi
Post by: khisanth on 23:46, 28 December 12
next update will have twice the RAM by the way
Title: Re: CPC on the Rasberry Pi
Post by: arnoldemu on 15:49, 29 December 12
I updated "Arnold TNG" for raspberry pi. I fixed the Makefile so it recognises the platform. The emu will still use sdl though. I haven't tried modifying the opengl code to use opengl es yet.

http://www.cpctech.org.uk/arnold_tng.zip (http://www.cpctech.org.uk/arnold_tng.zip)

EDIT: Reason i didn't do more on this. I have been trying to finish a game for cpc.
Title: Re: CPC on the Rasberry Pi
Post by: Marq on 21:20, 29 December 12
I updated "Arnold TNG" for raspberry pi. I fixed the Makefile so it recognises the platform. The emu will still use sdl though. I haven't tried modifying the opengl code to use opengl es yet.

http://www.cpctech.org.uk/arnold_tng.zip (http://www.cpctech.org.uk/arnold_tng.zip)

EDIT: Reason i didn't do more on this. I have been trying to finish a game for cpc.

I made a little framebuffer library that can stream bitmaps quickly to a texture:
svn://www.kameli.net/marq/koelli
Heavily copied from some example VC sources :)
Title: Re: CPC on the Rasberry Pi
Post by: Ynot.zer0 on 18:58, 05 January 13
... okay, it's 100% !Pi related, it's 100% BeagleBone related, but might be similar?  I just dug out my BeagleBone, upgraded the Angstrom linux and plugged the 3" LCD screen onto it.  works a treat.  After spending a little while oogling over the GUI and realising that a 320x240 desktop with 12pt fonts is just far too impractical to use in any proper manner, I dropped back out to the command line.... then this got me to thinking.  I have a usb webcam, mouse and keyboard connected...can I get an Amstrad CPC Emulator to run on this device? (obviously the webcam will be of no use..but maybe I'll be able to get a USB joystick?)
I took a look at:
Emulators - CPCWiki (http://www.cpcwiki.eu/index.php/Emulators#Unix_.2F_Linux)
and had a bit of an online google, it seems most of these emulators are expecting to be run from a windows manager, not from the command line?


I'm basically trying to look for an Amstrad CPC Emulator that I can start from the linux command line (a bit like the DOS laptop I have that runs a non-windows based Amstrad emu).
anyone got any pointers for me?
Title: Re: CPC on the Rasberry Pi
Post by: Gryzor on 21:24, 05 January 13
Much as I like my Pi's, I think I'm getting the next Ordroid (http://www.hardkernel.com/renewal_2011/products/prdt_info.php) which -I was told- will include a SATA port as well, thereby making it a fantastically viable  and extremely cheap solution for a full-capacity PC replacement...
Title: Re: CPC on the Rasberry Pi
Post by: Ynot.zer0 on 22:29, 05 January 13
I like.... although that is one monster of a heat sink!
Title: Re: CPC on the Rasberry Pi
Post by: Gryzor on 14:33, 09 January 13
Quote from: Ynot.zer0
I like.... although that is one monster of a heat sink!
Yeah, but look at the board's size! 52x48mm vs Pi's 86x54mm. In any case, the heatsink doubles as housing - I'm sure you can hack half of it off and it'll work just as well.
Title: Re: CPC on the Rasberry Pi
Post by: Bryce on 22:51, 09 January 13
Yeah, but look at the board's size! 52x48mm vs Pi's 86x54mm. In any case, the heatsink doubles as housing - I'm sure you can hack half of it off and it'll work just as well.

Yeah sure, the designer added that heatsink because he needed only half of it! Of course you can't hack half of it off! I'm pretty sure it's dimensioned to be as small as possible without overheating the CPU at full load. And I think it's tiny for the amount of power that board is going to disipate, I'd guess it already gets quite hot even at idle.

Bryce.
Title: Re: CPC on the Rasberry Pi
Post by: Gryzor on 16:06, 10 January 13
Nah, I was half-kidding. There's no reason to cut it anyway, since the heatsink's height is, as far as I can remember (page doesn't open for me right now) exactly as tall as the components on it (ports etc).

As for power, I think the PSU is a 5V/2A one. Given that it can be overclocked, it gets hot, yes, but not to a non-working level. It's probably more dangerous for the environment. The CPU is temperature-throttled:

First Throttle (85C): CPU goes down to 800Mhz
Second (102C): Down to 200Mhz
Software Shutdown occurs at  120oC
Hardware self protection shutdown at 123oC

But, supposedly, if you disable throttling in your Linux distro it can run up to 1700MHz without going much hotter. Never tried it, of course, but that's what they've been saying.

Title: Re: CPC on the Rasberry Pi
Post by: Munchausen on 01:55, 11 January 13

I'm basically trying to look for an Amstrad CPC Emulator that I can start from the linux command line (a bit like the DOS laptop I have that runs a non-windows based Amstrad emu).
anyone got any pointers for me?



Arnold is a safe bet, although on Haiku I had to hack it's build system a bit to get it to build against SDL only, disabling X etc and all the other sound options. However as you're building on linux you probably can just build against them even though you wont be using them and it ought to work. Then you only need to run on the command line:


export SDL_VIDEODRIVER=fbdev
or (depending on what framebuffer support you have on your system)

export SDL_VIDEODRIVER=fbcon

to tell SDL to use the framebuffer, and it should run fine.

Caprice is a good bet too, since it also uses SDL IIRC, and thus should be workable in a similar way to above. I think all the others though are either windows/DOS/Mac based or target X - I did a fairly thorough search when looking for a CPC emulator to port to Haiku, since it supports only SDL or it's own native API.


EDIT: I don't know why, but something funny has happened to the font sizes in this post...
Title: Re: CPC on the Rasberry Pi
Post by: CraigsBar on 17:42, 24 January 14
I compiled Arnold TNG last night on the Pi. And with the latest raspbian, with accelerated x, I get very close to native speeds when using the turbo over clock (1 GHz and 6volt)
Now if we can get opengl on the pi

Regards
Craig
Title: Re: CPC on the Rasberry Pi
Post by: steve on 15:59, 25 January 14
I compiled Arnold TNG last night on the Pi. And with the latest raspbian, with accelerated x, I get very close to native speeds when using the turbo over clock (1 GHz and 6volt)
Now if we can get opengl on the pi

Regards
Craig

Did I understand you correctly, A 1Ghz RPi emulates a 3.3Mhz CPC at almost real hardware speed?
Title: Re: CPC on the Rasberry Pi
Post by: arnoldemu on 16:23, 25 January 14
Did I understand you correctly, A 1Ghz RPi emulates a 3.3Mhz CPC at almost real hardware speed?
Emulating a cpc is not just the z80 ;)
You need to emulate the crtc, fdc, all the components ;)
And if you want accurate display, you need to emulate the monitor too.
One of the limiting factors on the pi, is probably how the emulator (my emulator arnold) updates the display. It draws to a buffer and probably software copies it to the display.
I haven't looked at speeding up that version of the emulator for the pi. Not yet.
I have however run my wip emulator on the pi and it runs, well slow - still because I haven't done optimisations for it yet.


Title: Re: CPC on the Rasberry Pi
Post by: steve on 16:29, 25 January 14
Well I suppose we cannot expect too much from the RPI, it does cost a fraction of the price of the CPC when new. :)
Title: Re: CPC on the Rasberry Pi
Post by: TFM on 23:35, 26 January 14
Nice to see that the CPC still can beat a GHz machine  ;) :P :laugh: 8)
Title: Re: CPC on the Rasberry Pi
Post by: AugustoRuiz on 12:30, 29 January 14
Emulating a cpc is not just the z80 ;)
You need to emulate the crtc, fdc, all the components ;)
And if you want accurate display, you need to emulate the monitor too.
One of the limiting factors on the pi, is probably how the emulator (my emulator arnold) updates the display. It draws to a buffer and probably software copies it to the display.
I haven't looked at speeding up that version of the emulator for the pi. Not yet.
I have however run my wip emulator on the pi and it runs, well slow - still because I haven't done optimisations for it yet.
Well... you could always draw to a texture, and let the GPU do the hard work for you... It's then a matter of drawing only a quad, with ortographic perspective, so that 1 texel = 1 pixel...
That should improve performance... A lot. And it would work for Windows too ;)
EDIT: Have a look at this:
Using OpenGL ES 2.0 on the Raspberry Pi without X windows. | Random Hacks (http://benosteen.wordpress.com/2012/04/27/using-opengl-es-2-0-on-the-raspberry-pi-without-x-windows/)
opengles-book-samples/Raspi at master · benosteen/opengles-book-samples · (https://github.com/benosteen/opengles-book-samples/tree/master/Raspi)

Title: Re: CPC on the Rasberry Pi
Post by: CraigsBar on 00:17, 18 February 14
I haven't looked at speeding up that version of the emulator for the pi. Not yet.
I have however run my wip emulator on the pi and it runs, well slow - still because I haven't done optimisations for it yet.


I know this is probably impossible, But I'll ask anyway..... It there any chance of Arnold being ported to RiscOS on the Pi? RiscOS imho has the best performance on the Pi at the cost of software availability.

Craig
Title: Re: CPC on the Rasberry Pi
Post by: robcfg on 17:49, 18 February 14
I do agree, I tested netsurf both on raspbian and on RiscOS, and it was definitely faster on RiscOS.
Title: Re: CPC on the Rasberry Pi
Post by: invent on 13:54, 27 May 16
Firstly, apologies for restarting an older thread. 


I have just bought a Raspberry Pi 3 and will build an emulator/machine  (https://www.element14.com/community/docs/DOC-80946/l/pik3a-the-raspberry-pi-3-ikea-retro-gaming-table) :) 
I have given up on actually buying an Amstrad CPC for the moment (hardly any locally) but want to set up a machine so that I (and the kids) can play all the games I loved back in the day, and of course re-enjoy developing new games for the system.   


I'm dreaming of course but it would be nice to one day build a CPC system that actually looks like a CPC even if its got some PC/rasberry hardware inside (maybe minus the tape drive for a SD card) :)


P.S. the warning at top of page suggested I start a new thread, I feel its still relevant to continue.



Title: Re: CPC on the Rasberry Pi
Post by: Audronic on 02:04, 28 May 16
Firstly, apologies for restarting an older thread. 

I have given up on actually buying an Amstrad CPC for the moment (hardly any locally).   
Hi Invent
What State are you in ?

Ray
Title: Re: CPC on the Rasberry Pi
Post by: invent on 12:21, 28 May 16
Hi Audronic, Im in Brisbane, Queensland :)