Rockbox Technical Forums

Support and General Use => Plugins/Viewers => Topic started by: theli on May 11, 2006, 07:06:17 AM

Title: ZX Spectrum emulator
Post by: theli on May 11, 2006, 07:06:17 AM
is anyone interested in this?
had anyone tried porting one?  ::)
Title: Re: ZX Spectrum emulator
Post by: theli on May 11, 2006, 09:23:45 AM
well... if anyone is interested ...
i'm trying to port one ...
it works now ... just lacks sound, user interaction , z80 snapshots loading is broken :(
:D

here are some screenshots:
http://theli.ho.com.ua/chuckie_nano.png
http://theli.ho.com.ua/chuckie_mini.png
well... grayscale needs another color mapping ... :)
http://theli.ho.com.ua/chuckie_video.png
( dumped in iPod simulators )
Title: Re: ZX Spectrum emulator
Post by: pabouk on May 11, 2006, 09:38:47 AM
That is great! Do you think that the downsized screen on H100 series (160x128 pixels) will be usable?
Title: Re: ZX Spectrum emulator
Post by: theli on May 11, 2006, 09:49:28 AM
That is great! Do you think that the downsized screen on H100 series (160x128 pixels) will be usable?
http://theli.ho.com.ua/chuckie_4g.png
but remember that i haven't yet mapped colors normally ...  ::)
Title: Re: ZX Spectrum emulator
Post by: Flid on May 11, 2006, 12:34:26 PM
Chucky Egg?!?! ZX Spectrum?!?!
You star. Childhood memories come flooding back.
Nice work!
Title: Re: ZX Spectrum emulator
Post by: shotofadds on May 14, 2006, 01:51:50 PM
Absolutely fantastic stuff, I've got to see this on my H110 :)

Have you some idea how the keyboard control is going to work?
Title: Re: ZX Spectrum emulator
Post by: theli on May 14, 2006, 02:22:11 PM
i was planning to have some predefined layouts as qaop from which user could choose mappings for his player buttons .. kempston jostick among them... and for other input, such as 'press S to start game' in 'Chuckie Egg' use virtual keyboard
Title: Re: ZX Spectrum emulator
Post by: Michael7 on May 15, 2006, 07:01:40 AM
If my wife found out chuckie egg could be played on my 5g it would be confiscated, took me long enough getting her off the PC.   :D ;D
Title: Re: ZX Spectrum emulator
Post by: Michael7 on May 15, 2006, 07:03:35 AM
I read somewhere that there are no copyrights for spectrum games anymore ;)
Title: Re: ZX Spectrum emulator
Post by: theli on May 15, 2006, 07:10:56 AM
anyone know of some snapshot for spectrum which shows all availible colors (16) so i could map them all normally for different targets?
Title: Re: ZX Spectrum emulator
Post by: gomem on May 16, 2006, 06:06:58 AM
I read somewhere that there are no copyrights for spectrum games anymore ;)

Spectrum games are most definately subject to copyright.

http://www.worldofspectrum.org/permits/
... which covers games in the WorldOfSpectrum archive.
Title: Re: 16 shades
Post by: shotofadds on May 17, 2006, 03:05:29 PM
Here ya go: www.shot-of-adds.co.uk/colours.z80 (http://www.shot-of-adds.co.uk/colours.z80)  ;)

(if you want anything else let me know and I'll see what I can do..)
Title: Re: ZX Spectrum emulator
Post by: theli on May 18, 2006, 12:45:02 AM
thanks :)
Title: Re: ZX Spectrum emulator
Post by: theli on May 19, 2006, 06:16:04 AM
http://www.rockbox.org/tracker/task/5400
Title: Re: ZX Spectrum emulator
Post by: miner49er on July 19, 2006, 06:34:36 AM
What's the state of this?
I would really like to see this running on my (newly purchased!) iRiverH320.

I will try the patch out tonight, when I get home, if I have time.
Mind you, now th feature freeze is lifted, can't we get this into CVS?

Hmmm, Monty on the run, Manic Miner, Jet Set Willy, Pyjarama....exciting!
Title: Re: ZX Spectrum emulator
Post by: theli on July 19, 2006, 07:50:18 AM
well, i haven't touched this from the moment i posted this to tracker due to workplace change and some other things ... i just have not much spare time now ...

so the state is:
working ZX Spectrum 48k emulation
should work on any of currently supported platforms  ( except archos due to very small screen... but if anyone wants this shouldn't require much changes)
lack of sound
maybe slightly confusing input system ( support for basic keyboard input and kempston joystick emulation )
terrible in terms of speed screen updating routine (though universal and works on all targets :) )
works like a viewer for tap , tzx , .z80 , sna files

and works, as i remember, at about 50% onmy iPod mini
Title: Re: ZX Spectrum emulator:
Post by: miner49er on July 19, 2006, 03:32:30 PM
Aaarrgghh!

When I do patch < zxbox.patch

I get

patch unexpectedly ends in middle of line
patch: **** Only garbage was found in the patch input.

I (quite ashamed to admit) havn't tried to use patches yet :-(

But have built rockbox succesfully in the past (I coded Spacerocks)


Edit: I've now tried another patch (maze something) and this works fine. Could it be my version of gunzip? I'll investigate... Or post a non-gzipped version...
Title: Re: ZX Spectrum emulator
Post by: theli on July 20, 2006, 01:48:48 AM
i remember linuxstb stating patch was gzipped 2 times ... though noone else experienced this ...
so try to gunzip it twice :)
Title: Re: ZX Spectrum emulator
Post by: miner49er on July 20, 2006, 06:51:48 AM
That's it :-)

Can't try it here at work but the very second I get home I will, well after dinner and putting my kid to bed anyway.

Ooohhh, exciting stuff :-)

Title: Re: ZX Spectrum emulator
Post by: miner49er on July 20, 2006, 04:11:45 PM
Nothing's ever simple is it?

I don't appear to have an apps/plugins/SUBDIRS file, so it can't be patched.

What's going on dude?

I really want this to work.

I won't give up though :-)
Title: Re: ZX Spectrum emulator
Post by: theli on July 21, 2006, 01:30:05 AM
hmm .. that's very strange :)
you should have it ...


http://www.rockbox.org/viewcvs.cgi/apps/plugins/SUBDIRS


so you are running from incorrect directory or there is something wrong with your sources
Title: Re: ZX Spectrum emulator
Post by: miner49er on July 21, 2006, 02:19:10 AM
okay, I do have a appls/plugins/SUBDIRS  file - I have to specify where it is though after running patch.

Question: When I run patch < whatever.patch, where should I run it from? I've been running it from my root rockbox directory and any new files that are in the patch are placed there, I then have to manually copy them over to the correct place - this seems a bit rubbish to me.

Are there any command line params to specify where files shoulld go - I must be doing something wrong here.
Title: Re: ZX Spectrum emulator
Post by: theli on July 21, 2006, 06:18:35 AM
well, i don't know what is wrong but running
patch -p0 < zxbox.patch in rockbox root directory should do all fine
Title: Re: ZX Spectrum emulator
Post by: theli on July 21, 2006, 07:17:56 AM
anyway .. does someone want to work on it?
cause it doubtfully would be committed in its current state if none would actively work on it

and i just have no opprtunity to do this now ...
Title: Re: ZX Spectrum emulator
Post by: shotofadds on July 21, 2006, 11:32:43 AM
I'd help out with this, but for two things:

1) At the moment I'm limited to a Windows PC, so trying to contemplate patching, CVS etc on this machine gives me the shudders!

2) I've just replaced my broken iRiver with a Zen Vision:M, for which there is no Rockbox yet. (I also don't feel I'm technically knowledgable enough to help out with the start-of-life coding for a new port)

Unfortunately while 1) can be overcome, 2) is a bit of a show-stopper for me  >:(
Title: Re: ZX Spectrum emulator
Post by: miner49er on July 21, 2006, 12:54:49 PM
If I could get it building then I would love to help work on it. But perhaps the trouble i'm having getting it to build indicates how succesfull I would be at adding anything to it...

Perhaps if you could identify parts that could be optimised I could have a look.

I'd love to see this working at it's full potential.

Edit: Got it working! Yay! Seems a bit slow, now I will look at the code and see if there is anything obvious to speed it up.
Title: Re: ZX Spectrum emulator
Post by: theli on August 14, 2006, 04:49:14 AM
i've uploaded a new version on the tracker...
reworked virtual keyboard input
it now uses grayscale lib on non-color targets ... should work on any current target
as for perfomance .... when not using grayscale lib on my iPod mini it runs at about 41 FPS (25 == realtime)
with grayscale i think it is near 90 ( or even 100.. just had no opportunity to measure)
i'm wondering now at what speed it runs on color targets ... so if anyone is willing to test .....

so the only thing left is sound support (well, mainly, sound output)... i would be thankful if anyone can help in this part.

some more screenshots:
Chuckie the egg on Archos Recorder:
(http://img222.imageshack.us/img222/3203/chuckierecorderdt9.png)

Some Demo/Intro on iPod 4g without grayscale lib:
(http://img100.imageshack.us/img100/6655/castor4g2bppuo6.png)
and with grayscale:
(http://img142.imageshack.us/img142/9859/castorgraydp6.png)
and the same on nano in color:
(http://img95.imageshack.us/img95/2443/castornanoie3.png)
Title: Re: ZX Spectrum emulator
Post by: miner49er on August 15, 2006, 03:58:41 PM
Coolness!

I will try this out at the first available opportunity!

You managed to speed it up then?
Title: Re: ZX Spectrum emulator
Post by: theli on August 15, 2006, 11:28:42 PM
slightly :)
i wonder how the speed is on other targets....
Title: Re: ZX Spectrum emulator
Post by: theli on August 29, 2006, 10:26:03 AM
i've updated a patch and as it now can show actual speed of emulation i wonder what the speed is on different targets .... with different frameskip settings ... (well, i'm interested in 0-3 frameskip mainly :) )

btw i saw it was included in iRiver H3x0: Kosh's 'Experimental' build had anyone tried it?

ps: i advice to turn sound off for now ... this sound horrible still ;)
Title: Re: ZX Spectrum emulator
Post by: Jazz00006 on August 29, 2006, 08:36:30 PM
=S trying it out now..... o wait, blerg, how does one run it? its not a pre-defined ext, and i cant find it in, open with > *
Title: Re: ZX Spectrum emulator
Post by: theli on August 30, 2006, 02:28:16 AM
i'm not really sure what are you talking about ...
try it with this file (http://theli.ho.com.ua/chuckie.sna)

Title: Re: ZX Spectrum emulator
Post by: BigMac on September 03, 2006, 10:55:56 AM
well does this run greyscale files on color models?
Keep ROCking on!
Title: Re: ZX Spectrum emulator
Post by: theli on September 04, 2006, 01:48:45 AM
i'm confused ... what greyscale files are you talking about?

zxbox runs in greyscale on greyscale models and in color on color models ....
Title: Re: ZX Spectrum emulator
Post by: BigMac on September 04, 2006, 02:04:42 AM
I was asking if i could run a greyscale program on a color target
Keep ROCKing on!
Title: Re: ZX Spectrum emulator
Post by: theli on September 04, 2006, 02:48:02 AM
zxbox fully emulates ZX Spectrum 48k.
so any program you can run on ZX Spectrum 48k you can run in zxbox.
it doesn't matter on what supported target are you running it on.
Title: Re: ZX Spectrum emulator
Post by: miner49er on September 05, 2006, 06:54:47 AM
I've managed to get it running on my H300.

Please don't see this as too negative but it's really too slow to be usable at the moment. I've tried manic miner and kokotoni wilf, mm starts but is too slow to play and kw doesn't seem to start.

there must be a way to speed this up?

I mean, I was playing speccy games on my P133 at full speed.

If I can help then, please ask.
Title: Re: ZX Spectrum emulator
Post by: theli on September 05, 2006, 07:18:39 AM
well, i can play Chuckie Egg on my mini at more then 100% without frameskipping ( > 50 FPS )...
as i know speed on iPod Video is about 70-80% ...
i can't tell it is unusable :)

so what is speed display when you turn on option "display speed" ? and try it with frameskip 0,1,2,3
Title: Re: ZX Spectrum emulator
Post by: theli on September 05, 2006, 07:21:00 AM
as for kokotoni wilf ...
zxbox runs this tape of it
ftp://ftp.worldofspectrum.org/pub/sinclair/games/k/KokotoniWilf.tap.zip
fine
Title: Re: ZX Spectrum emulator
Post by: miner49er on September 05, 2006, 09:28:00 AM
Kokotoni wilf shows 30 fps and stays on a green screen.
manic miner, runs at max 60fps with frameskip of 4

Oh, one major fix would be able to press >1 buttons simultaneosly - can't jump left or right on mm.

maybe, I'm missing something - does it require the latest rockbox to be build, mine is a few weeks old.
Title: Re: ZX Spectrum emulator
Post by: evilnick on September 05, 2006, 12:28:05 PM
Quote
Oh, one major fix would be able to press >1 buttons simultaneosly - can't jump left or right on mm.


This *might* be a hardware problem on the iRiver h**0 players, the way I understand it, you can only press PLAY+another button, so if you map PLAY to jump then in theory you should be able to jump sideways.

Of course, I'm usually wrong!
Title: Re: ZX Spectrum emulator
Post by: theli on September 06, 2006, 02:05:22 AM
hm .. it shows 60 % and 30 % ? (these are not FPS if they are %) rather slow ... :(
you confused me ... first versions really showed rendered frames per second number ....
but now zxbox shows actual emulation speed disregarding number of frames rendered
though as you say you changed frameskip i assume you are using more or less up-to-date patch ...
btw, are you using the latest patch posted?

as for buttons - i also think this is a hardware problem because zxbox reads states of all buttons each frame and i can easily jump sideways on my iPod mini in Manic Miner/Rainbow Islands/Chuckie Egg/Bubble Bobble


Kokotoni wilf stays on a green screen.

did you tried that tape link to which i provided?
are there any messages before it stays at that screen?
actually .. there can be a bug regarding file extension ... can you rename tape from KOKOTONI.TAP to something like kokotoni.tap ( 'tap' with lower letters )
Title: Re: ZX Spectrum emulator
Post by: pabouk on September 06, 2006, 09:37:15 AM

Quote
Oh, one major fix would be able to press >1 buttons simultaneosly - can't jump left or right on mm.

This *might* be a hardware problem on the iRiver h**0 players, the way I understand it, you can only press PLAY+another button, so if you map PLAY to jump then in theory you should be able to jump sideways.

Yes, it is a hardware problem.
There are several possible workarounds:

- PLAY button and HOLD switch are independent so you can detect any PLAY / HOLD + other button combination.

- The remote can be used and any combination of one button on the remote + one button on the main unit can be detected.

- Although you cannot detect more buttons pressed simultaneously you can detect transitions. For example:
1) Sequence REC, REC+RIGHT, RIGHT gives this sequence of values from ADC:
    E0, 87, 87
2) Sequence REC, no-press, RIGHT gives:
    E0, FF, 87
It is possible to detect whether the REC was being pressed when you clicked RIGHT although it could be CPU hungry to read ADC often enough.
3) Unfortunately the reversed sequence cannot be detected as RIGHT, REC+RIGHT gives:
    87, 87
Also REC release cannot be detected while RIGHT is pressed because RIGHT value - 87 overrides REC value - E0.
Title: Re: ZX Spectrum emulator
Post by: theli on September 15, 2006, 06:22:36 AM
zxbox has just been commited and became a part of RockBox ....
as i own only one target i may have introduced some errors...
i f anyone wants to test (latest cvs buils already includes this) please report problems here.
thanks :).
Title: Re: ZX Spectrum emulator
Post by: theli on September 15, 2006, 09:59:01 AM
i've added some basic documentation to wiki here:
http://www.rockbox.org/twiki/bin/view/Main/PluginZXBox
Title: Re: ZX Spectrum emulator
Post by: pabouk on September 16, 2006, 03:44:58 AM
Thank you for your work and congratulations for accepting it into the CVS :) It is a great plug-in.

I would like to share some ideas for improvements:

1. It would be much more usable if you can map the PLAY key on iriver H100 series for controlling games. There is one very good reason for this: PLAY is the only button which could be detected in combination with any other button. For example Manic Miner is unplayable on H100s now because it is not possible to jump to the right or left.

2. The Custom keymap function should not probably map some virtual keys like: up, down ... fire/jump but it should map the real keys of the hardware target like: UP, DOWN ... NAVI, PLAY, RECORD.

3. It would be great if you can also map the buttons of the remote. For example on H100 series it again has the advantage of possibility to detect simultaneous button presses.

4. The VKeyboard is missing some keys like SYMBOL SHIFT and CAPS SHIFT. There should also be possibility to generate simultaneous presses of several keys and it would be great if there are some predefined simultaneous presses like on the keyboard of ZX Spectrum+.

5. Optional antialiasing on screens with a lower resolution than 256x192. Yes, I know that it would be considerably slower but the text is sometimes unreadable on H100 series :(.

6. Zoom on screens with a lower resolution to show the pixels 1:1. For example on H100 series it would be useful if you could control the zoom when the switch HOLD is activated i.e. NAVI - zoom/unzoom, joystick - move the slice.

7. Possibility to save the keymap, joystick and probably other settings separately for every tape or snapshot.

One bug report from iriver H120: It crashes after several seconds when the sound is turned on. Also the sound is played in loop if you enter the menu or even if you quit the plug-in.
Title: Re: ZX Spectrum emulator
Post by: chomp on September 17, 2006, 04:32:37 PM
i think the first thing to do to have quick feedbacks about this eulator is to do a key map for all supported hardwares with rockbox because i personnaly own an ipod nano and i can't test ti because i'm blocked at start menu of games because i don't understand how to map keys  ::)
Title: Re: ZX Spectrum emulator
Post by: chomp on September 17, 2006, 04:50:15 PM
oh ! i don't know if it's normal, but on my ipod nano 4gb the emulator definitively don't work, when i press a button , nothin occur, i have tested with chucky egg and pacman and star war 3D....  :-\ so what's wrong ?
Title: Re: ZX Spectrum emulator
Post by: pabouk on September 17, 2006, 05:47:06 PM
In Chucke Egg you have to "press" 'S' and then '1' to start the game for one player. You must use the virtual keyboard to generate the key presses. The virtual keyboard is in the menu which shows up after pressing hold on iPods.
Title: Re: ZX Spectrum emulator
Post by: theli on September 18, 2006, 02:28:42 AM

Thank you for your work and congratulations for accepting it into the CVS It is a great plug-in.

I would like to share some ideas for improvements:

1. It would be much more usable if you can map the PLAY key on iriver H100 series for controlling games. There is one very good reason for this: PLAY is the only button which could be detected in combination with any other button.

as a fastest solution we can just change navi to play.


2. The Custom keymap function should not probably map some virtual keys like: up, down ... fire/jump but it should map the real keys of the hardware target like: UP, DOWN ... NAVI, PLAY, RECORD.

You mean menu strings?
Yes, i can change this for all targets.


3. It would be great if you can also map the buttons of the remote. For example on H100 series it again has the advantage of possibility to detect simultaneous button presses.

i already thought about supporting the ability to map as much buttons as you can on targets...
for now there are only 4 just because its the number availlible on all of targets.
this will require some work.


4. The VKeyboard is missing some keys like SYMBOL SHIFT and CAPS SHIFT. There should also be possibility to generate simultaneous presses of several keys and it would be great if there are some predefined simultaneous presses like on the keyboard of ZX Spectrum+.

i think i can add this buttons though simultaneous keypresses will require vkeyboard rework as for now its just cut down version of rockbox's virtual keyboard with custom layout


5. Optional antialiasing on screens with a lower resolution than 256x192. Yes, I know that it would be considerably slower but the text is sometimes unreadable on H100 series.

thats not about aa... it just that scaling just skips some lines and columns so that picture fit screen...
aa won't help.
:) .... possible solution will be your next request

btw, what is the speed on h100? for now it uses grayscale lib but i can write 4bpp driver for it (on iPods it gives a great speed boost.. though only 4 colors)


6. Zoom on screens with a lower resolution to show the pixels 1:1. For example on H100 series it would be useful if you could control the zoom when the switch HOLD is activated i.e. NAVI - zoom/unzoom, joystick - move the slice.

i'll think of way this can be implemented


7. Possibility to save the keymap, joystick and probably other settings separately for every tape or snapshot.

i thought about having the ability to add own keymaps to 'custom keymaps'...
for now they can easily be added into source


One bug report from iriver H120: It crashes after several seconds when the sound is turned on. Also the sound is played in loop if you enter the menu or even if you quit the plug-in.

yes. this is not target-specific ... sound suppport is still unfinished (anyone wants to help?) it can crash any target unfortunately... :(

though i'm now working on Atari 2600 emulator i will work on this issues too as i want this to be usable as much as possible (with my programming skills ;) ). any help is welcomed
Title: Re: ZX Spectrum emulator
Post by: pabouk on September 18, 2006, 04:49:43 AM


1. It would be much more usable if you can map the PLAY key on iriver H100 series for controlling games. There is one very good reason for this: PLAY is the only button which could be detected in combination with any other button.

as a fastest solution we can just change navi to play.

Yes, it is good and fast solution. :)



2. The Custom keymap function should not probably map some virtual keys like: up, down ... fire/jump but it should map the real keys of the hardware target like: UP, DOWN ... NAVI, PLAY, RECORD.

You mean menu strings?
Yes, i can change this for all targets.

Yes, I meant the strings and possibility to map all available buttons of the target as you wrote below.



5. Optional antialiasing on screens with a lower resolution than 256x192. Yes, I know that it would be considerably slower but the text is sometimes unreadable on H100 series.

thats not about aa... it just that scaling just skips some lines and columns so that picture fit screen...
aa won't help.

With aa it will not skip the lines and columns but it will count them into the resulting picture. There is a good description of antialiasing (http://en.wikipedia.org/wiki/Antialiasing) in Wikipedia. The simplest approach with just averaging of the content of the destination pixel would be fairly sufficient. I think I could prepare some basic functions.


btw, what is the speed on h100? for now it uses grayscale lib but i can write 4bpp driver for it (on iPods it gives a great speed boost.. though only 4 colors)

The speed is not great... It is about 45%, with frameskip 4 it is 51% and in the fast mode 60%.


any help is welcomed

I hope I will find time to install the development environment and to get involved more although I am not a good programmer.
Title: Re: ZX Spectrum emulator
Post by: theli on September 18, 2006, 05:19:59 AM

With aa it will not skip the lines and columns but it will count them into the resulting picture. There is a good description of antialiasing (http://en.wikipedia.org/wiki/Antialiasing) in Wikipedia. The simplest approach with just averaging of the content of the destination pixel would be fairly sufficient. I think I could prepare some basic functions.

i think that better looking scaling will get us near 10% speed

The speed is not great... It is about 45%, with frameskip 4 it is 51% and in the fast mode 60%.

i think not using grayscale lib will give about 100% then... i'll try.
you can come to irc so we can try this, cause i don't own h100

I hope I will find time to install the development environment and to get involved more although I am not a good programmer.

me neither :)
Title: Re: ZX Spectrum emulator
Post by: chomp on September 18, 2006, 10:16:01 AM

In Chucke Egg you have to "press" 'S' and then '1' to start the game for one player. You must use the virtual keyboard to generate the key presses. The virtual keyboard is in the menu which shows up after pressing hold on iPods.


thanks but this don't works to. when i press a key on the Vkeyboard nothin happens !
others bugs:
- when i start a game, there is no backlight
- when i go to the menu (by switching old) it takes about 3-4 secondes before i can move in the menu or press a key....

 :-[
Title: Re: ZX Spectrum emulator
Post by: theli on September 18, 2006, 12:47:39 PM

thanks but this don't works to. when i press a key on the Vkeyboard nothin happens !
others bugs:
- when i start a game, there is no backlight
- when i go to the menu (by switching old) it takes about 3-4 secondes before i can move in the menu or press a key....

 :-[

load tape, wait for running at bottom string "press s to start.."
press 's' using vkeyboard ( upper S means space )
wait for string "1,2,3 players" to appear and press '1' with vkeyboard

as for backlight i think i just can make it enabled during playing .. any objections?

hold issue is not related to zxbox
Title: Re: ZX Spectrum emulator
Post by: chomp on September 18, 2006, 02:37:53 PM
no objections for me  ;D
thx i'll try this now
Title: Re: ZX Spectrum emulator
Post by: chomp on September 18, 2006, 02:49:43 PM
HAAAAAAAAAAAAAAAAAAAAAAAAAAA  >:( :'(
i'm a dummy !
exactly what i do:
i launch the tape, when it show "press S .... " i switch HOLD, go to VKeyboard highlight "S" and press select (i have try buy pressing Play or Menu to) and nothin happens !
edit: it was "s" not "S" , that's why....
so i finally go ingame but i can't move the character....  :'( :'( :'( :'( :'(
Title: Re: ZX Spectrum emulator
Post by: theli on September 19, 2006, 02:22:18 AM
so i finally go ingame but i can't move the character....  :'( :'( :'( :'( :'(

that's probably because keys are mapped to kempston joystick by default and Chuckie Egg uses keyboard input.
Change this in options->map to kempston
Title: Re: ZX Spectrum emulator
Post by: chomp on September 19, 2006, 09:38:03 AM
okay.......... and do you know a website where i can find inlaycards for zx spectrum games ???
Title: Re: ZX Spectrum emulator
Post by: theli on September 19, 2006, 09:49:20 AM

okay.......... and do you know a website where i can find inlaycards for zx spectrum games ???

http://worldofspectrum.org/
like this one:
ftp://ftp.worldofspectrum.org/pub/sinclair/games-inlays/c/ChuckieEgg.jpg
Title: Re: ZX Spectrum emulator
Post by: chomp on September 19, 2006, 03:17:48 PM
okay, that will help me, many thx for all your help.  ;)
Title: Re: ZX Spectrum emulator
Post by: theli on September 20, 2006, 06:16:32 AM
anyone interested can try this build of zxbox for iRiver H120/140
[edited see below]
it includes 4bpp output driver without using grayscale lib and changes navi to play in keymap
Title: Re: ZX Spectrum emulator
Post by: Llorean on September 20, 2006, 06:21:47 AM
By H100 you mean the H110/115 right, not H120/140?
Title: Re: ZX Spectrum emulator
Post by: theli on September 20, 2006, 06:30:33 AM
what is h110/115 ???
i meant grayscale iRivers : H120/H140
Title: Re: ZX Spectrum emulator
Post by: Llorean on September 20, 2006, 06:37:30 AM
There are two versions of the H100 series, the H110/115 only have 16mb of ram, the H120/140 have 32. Which means plugins compiled for one set won't work on the other.

The H110/115 are commonly called the "H100" build, and the H120/140 are the "H120" build.
Title: Re: ZX Spectrum emulator
Post by: theli on September 20, 2006, 06:40:53 AM
ah ... i see
my mistake
so ....
http://theli.ho.com.ua/h100/zxbox.rock
http://theli.ho.com.ua/h120/zxbox.rock
Title: Re: ZX Spectrum emulator
Post by: Llorean on September 20, 2006, 06:43:11 AM
I edited your post to make it clearer then.
Title: Re: ZX Spectrum emulator
Post by: theli on September 20, 2006, 06:44:23 AM
he-he .. i've already made that post obsolete ;)
anyway, thanks Llorean.
Title: Re: ZX Spectrum emulator
Post by: theli on September 20, 2006, 08:36:59 AM
I've updated ZXBox wiki page
http://www.rockbox.org/twiki/bin/view/Main/PluginZXBox
with screenshots for different targets :)
Title: Re: ZX Spectrum emulator
Post by: pabouk on September 20, 2006, 08:58:53 AM
I have tried the new build but unfortunately it is not very close to the 100% speed :(

Manic miner - now playable with the Play button, thak you :)
frameskip  speed %
0               55
5               72
fast           79

Chuckie egg
0               50
5               62
fast           65

I do not know how is the speed measurement reliable because in Manic miner with frameskip 0 it went slowly from 55% to 66% and then slowly back down.

When loading a tzx tape image it also shows something like "i: il bytes, Data". But then it works normally. The Rockbox's snprintf() function called from static void put_seg_desc(void) does not support the number after % probably?
Title: Re: ZX Spectrum emulator
Post by: theli on September 25, 2006, 01:56:29 AM
so changing to 4bpp output didn't inrease speed?
cause then i won't enable 4bpp for iRivers in cvs ...
Title: Re: ZX Spectrum emulator
Post by: pabouk on September 25, 2006, 04:23:37 AM
The speeds of Manic Miner with grayscale lib are:
frameskip  speed %
0               32
5               57
fast           67

So with the most usable frameskip 5 there was 15 percentage points increase.

Unfortunately I do not think that the speed gain is worth the sacrifice of the number of shades. For example the second screen in Manic Miner is unplayable becase the platforms have the same colour as the background with 4 bpp :(

If you want to include the 4 bpp driver I am strongly for leaving the grayscale lib there too and adding an option "full grayscale" / "4 bpp".
Title: Re: ZX Spectrum emulator
Post by: theli on September 25, 2006, 04:40:20 AM
switching different rendering driver from options is not what i wanted to do...
so i'll leave grayscale rendering for now.
Title: Re: ZX Spectrum emulator
Post by: pabouk on September 25, 2006, 09:05:15 AM
Great ;D !!!

I have 99% speed with frameskip 3 and grayscale lib on H120 now :D
It seems that the better IRAM usage improved the speed greatly.
Speed in fast mode is between 160 and 190%
Thank you for your work, Theli.

Is the sound supposed to work correctly now? It seems to be non-continuous and sometimes I hear a loud pop.
Title: Re: ZX Spectrum emulator
Post by: theli on September 25, 2006, 09:48:30 AM
sound support still unfinished ...
it only should not crash rockbox for now. ;)

by the way, as speed calculation is not very precise 98-100 % usually means 100% :)
Title: Re: ZX Spectrum emulator
Post by: chibacity on September 26, 2006, 02:45:50 PM
Great work theli!

I'm running the emulator on a H300 and getting 100% on 2/3 frameskip, and sometimes 100% with no frameskip. Great stuff.

Just a couple of questions...

Has anyone noticed that the virtual keyboard works a bit sporadically? Or is it just me... Some key "stokes" seem to be getting gobbled up.

A game that I tried to play (Uridium) requires a key that I can't seem to map SYM/SHIFT?

Has anyone got Uridium to play with joystick mode. I can select single player joystick mode (3), but I cannot get the game to start.

Cheers.
Title: Re: ZX Spectrum emulator
Post by: theli on September 27, 2006, 01:59:20 AM
i 've just completed Zinc level in Uridium in H300 sim ... just set "Map to kempston" to yes and press Fire (play on iriver) to play
Title: Re: ZX Spectrum emulator
Post by: theli on September 27, 2006, 02:29:53 AM
btw.. i can implement dynamic frameskip .... :
if speed get's lower than 90% increase frameskip by 1
if higher than 95% (?) then decrease by 1

anyone sees this as usefull feature?
Title: Re: ZX Spectrum emulator
Post by: chibacity on September 27, 2006, 05:35:12 AM
'lo theli,

The dynamic framskip sounds like it could be a really good idea.

I'm assuming that you played Uridium on the H300 simulator and not on a H300 device? I still can't play it! :( When the game loads up, I have kempston chosen, and then press '3' to choose single player 'joystick', but no joy when I press fire (play). I can't get it to work with key mapping either as there is no option for SYM SHIFT. Sorry to carp on, but Uridium is such a classic!  :)

Cheers for all the hard work.
Title: Re: ZX Spectrum emulator
Post by: theli on September 27, 2006, 08:05:41 AM
i can't really tell what is going on cause i haven't seen any options in Uridium...
just press "Fire" on kempston joystick and you set :)

i .. i see ... 3 starts game for 1 player and joystick

but ... just tried to press 3 with vkeyboard and then press Play on h300 sim .. it works fine :)

just played it on my mini - it works fine too ...
Title: Re: ZX Spectrum emulator
Post by: chibacity on September 27, 2006, 09:27:20 AM
seems like it might be an issue with the H300 - anybody with a H300 like to give some feedback?

Cheers.
Title: Re: ZX Spectrum emulator
Post by: theli on September 27, 2006, 09:30:45 AM
i can't see how this can be connected to target.

well, uridium doesn't immediatly start on fire for me even on other emulators. i just pressed fire again.