Home Page

Fantasy World Dizzy control problem on pentagon

Posted By: geecab

Fantasy World Dizzy control problem on pentagon - 05/15/15 09:56 PM

Fantasy World Dizzy 128K doesn't run using the spec128 driver (It crashes just after the speech sample). I decided to see if it worked any better with the pentagon spectrum clone - and it did! The game doesn't crash, and looks & sounds perfect. However, the player's controls all seem to be stuck "on", making it impossible to move your character (he just keeps jumping up and down).

I did a bit of debugging to try and work out how Dizzy3 reads the input control ports. Dizzy3 is slightly unusual for a spectrum game in that you don't need to select a Keyboard/KempstonJS/SinclairJS at the start of each game, you can use all control types at anytime during the game (it constantly polls them all).

I could see the input 0x1f port (Kempston Interface) being called a lot. I google-ed stuff about the 0x1f port and the pentagon, and found this old bug report:


Seems the pentagon can have a "BetaDisk" drive and Kempston interface that both read from port 0x1f. And whether you have a "BetaDisk" attached or not has an effect on what you read from the 0x1f port.

So I think there might be a similar issue in MESS. I couldn't figure out a way to disable the BetaDrive in MESS's TAB-menu, so I decided to make a quick hack to the pentagon driver (See my 'Hack' comments below):

static ADDRESS_MAP_START (pentagon_io, AS_IO, 8, pentagon_state )
AM_RANGE(0x0000, 0x0000) AM_WRITE(pentagon_port_7ffd_w) AM_MIRROR(0x7ffd) // (A15 | A1) == 0
//AM_RANGE(0x001f, 0x001f) AM_DEVREADWRITE(BETA_DISK_TAG, beta_disk_device, status_r, command_w) AM_MIRROR(0xff00) //Hack - I removed this
AM_RANGE(0x001f, 0x001f) AM_READ(spectrum_port_1f_r) AM_MIRROR(0xff00) //Hack - I copied this from spec128 driver
AM_RANGE(0x003f, 0x003f) AM_DEVREADWRITE(BETA_DISK_TAG, beta_disk_device, track_r, track_w) AM_MIRROR(0xff00)
AM_RANGE(0x005f, 0x005f) AM_DEVREADWRITE(BETA_DISK_TAG, beta_disk_device, sector_r, sector_w) AM_MIRROR(0xff00)
AM_RANGE(0x007f, 0x007f) AM_DEVREADWRITE(BETA_DISK_TAG, beta_disk_device, data_r, data_w) AM_MIRROR(0xff00)
AM_RANGE(0x00fe, 0x00fe) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_MIRROR(0xff00) AM_MASK(0xffff)
AM_RANGE(0x00ff, 0x00ff) AM_DEVREADWRITE(BETA_DISK_TAG, beta_disk_device, state_r, param_w) AM_MIRROR(0xff00)
AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("ay8912", ay8910_device, data_w) AM_MIRROR(0x3ffd)
AM_RANGE(0xc000, 0xc000) AM_DEVREADWRITE("ay8912", ay8910_device, data_r, address_w) AM_MIRROR(0x3ffd)

I wasn't quite sure what I was doing to be honest with you, but it seemed worth a shot, and it did the trick, the game plays great now smile

Just thought I'd mention my findings, hope this helps!
Posted By: Duke

Re: Fantasy World Dizzy control problem on pentagon - 05/16/15 08:09 AM

Yeah if the BetaDisk isn't part of the original machine then it should be made optional.
Posted By: MetalliC

Re: Fantasy World Dizzy control problem on pentagon - 05/17/15 04:31 PM

in the case of Pentagon128 - BDI is not option, its on main board.
Kempston joystick IF and AY-3-891x sound is optional, they are on additional board, which may be or may not present in machine.

I can's see big problem here, except Kemston is not emulated for Pentagon128.
I've loaded Dizzy3 tzx, pressed 0 - controls seems fine as Sinclair joy.
btw on current git build it works for spec128 too.
Posted By: geecab

Re: Fantasy World Dizzy control problem on pentagon - 05/17/15 09:19 PM

Hi Metallic! Thanks for looking into this. I apologize in advance if this problem is fixed in the latest sources (I think my sources were about 3 weeks old). Its not really a big problem I know, I just thought I'd mention it incase anyone else had been trying to get Dizzy3 working.

I've just tried to update my sources to latest version, I did a "git pull", it seems to have brought all my sources up to date, but now I can't build mess anymore. My scripts/target/mess directory has been deleted. Not sure what I've messed up here, I can still build mame ok though. I'll look into this more when I have a bit time on my hands.

Just wanted to make absolutely sure, you are running Dizzy3 in 128k mode, I.e. It looks and sounds (128K music etc..) like this:-
Posted By: mahlemiut

Re: Fantasy World Dizzy control problem on pentagon - 05/17/15 10:15 PM

MAME now combines everything by default.

Use make SUBTARGET=mess to build MESS.
Posted By: geecab

Re: Fantasy World Dizzy control problem on pentagon - 05/18/15 07:29 PM

mahlemuit: Thanks, its compiles again!

MetalliC: My apologies, Dizzy3 works fine now with spec128. I rolled back a few spectrum.c fixes and it was this commit https://github.com/mamedev/mame/commit/a05b613d1cebbee1f4e4b737de9cd0a225f695a6 which stops it crashing. Sorry for the confusion, I'll keep my sources right up to date in future.

Regarding the pentagon kempston betadrive, it may have been helpful to have kempston emulation (or just some way of stopping port 0x1f returning 0xff whenever polled) if the only way to play Dizzy3 was on the pentagon, but now Dizzy3 works with spec128 its not an issue for me anymore smile
Posted By: Haze

Re: Fantasy World Dizzy control problem on pentagon - 05/18/15 07:37 PM

I think it's a bit early to have a dedicated spectrum thread, before we can even come close to accurate emulation of the official models we need a sub-cycle exact z80 core, fully stallable at every step of the fetch-execute cycle.

Really happy to see Dizzy 3 fixed tho, I was wondering what was causing the issue there last time I looked at it.

Reminds me I have some TZX fixes for loading some currently unsupported block formats to dig up and submit at some point (not really widely used by many images, as they're mostly redundant / inefficient ways of storing things that can be stored in a better way, but you do still find a few using them)

Posted By: ICEknight

Re: Fantasy World Dizzy control problem on pentagon - 05/22/15 01:58 AM

Just in case it could be of help, here's the FBZX-Wii bug tracker with some game-specific bugs, which you guys may come across when polishing the Spectrum core: https://code.google.com/p/fbzx-wii/issue...Owner%20Summary
© 2020 Forums