Hallo from Poland

Introduce yourself to your fellow forum members - what was your journey into the Sinclair world?
ilyad731214
Posts: 15
Joined: Thu Jul 27, 2017 9:43 am

Hallo from Poland

Post by ilyad731214 »

Hello.
After more than 25 years, I began to re-engage with the ZX-81. I also bought ZX-Pand recently. It is good that there are so many enthusiasts of this equipment. To the top of the question: Which ports do ZX81 read the keyboard? I want to try to modify the game to work with ZX-Pand joystick.
ZX-81, ZX-Pand AY, 48k "Rubber", 48K+, 128K + "Toastrack", +2 "grey" 1024k Profi, Masakrator FM, DivIDE 2K11, ZX Evolution rev. C, ZX-Uno, C64, C16 64K, Plus4 + 1541 Ultimate II + SD2IEC
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Hallo from Poland

Post by mrtinb »

Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Hallo from Poland

Post by dr beep »

Keyboard can be read with IN 254 and the line of the keyboard in highbyte, however it can also be read met sysvar LASTK.
So a game will not by default read from IO ports, also a derivate of the ports can be used for control.
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: Hallo from Poland

Post by sirmorris »

Hi!

Adding joystick support to existing games was a hobby of mine for a little while. The results are here:

viewtopic.php?f=4&t=833

I now write a patch program that in turn loads the game to be patched and inserts hooks into the input routines. Pretty much every game I've ever seen has been different which is where the fun, and EO's debugger, comes in ;) It's actually easier than modifying a game in-place a lot of the time. Also it is better this way as it prevents lots of different copies of the program making their way out into the world.

All of the patches that I've developed come with source code to study.

I will be very happy to assist you in your efforts :D
ilyad731214
Posts: 15
Joined: Thu Jul 27, 2017 9:43 am

Re: Hallo from Poland

Post by ilyad731214 »

Thanks for the reply.
Sorry for the question:
How can an example keyboard read procedure look like? I would like to know where to start ...
ZX-81, ZX-Pand AY, 48k "Rubber", 48K+, 128K + "Toastrack", +2 "grey" 1024k Profi, Masakrator FM, DivIDE 2K11, ZX Evolution rev. C, ZX-Uno, C64, C16 64K, Plus4 + 1541 Ultimate II + SD2IEC
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: Hallo from Poland

Post by sirmorris »

sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: Hallo from Poland

Post by sirmorris »

There are basically 2 types of input routine.

'typing' - one key code is read at a time using the ROM routines.
'gaming' - direct reading of the keyboard rows using the IN instruction.

You need to load the target game into an emulator and identify where the movement code is located. This is the hardest bit.

Do you have a particular game in mind?

*note to self - perhaps add a feature in the EO debugger which breaks on an IO operation? Or a ROM call?
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: Hallo from Poland

Post by Andy Rea »

sirmorris wrote: Thu Jul 27, 2017 2:41 pm

*note to self - perhaps add a feature in the EO debugger which breaks on an IO operation? Or a ROM call?
a break on IO ($xx),r would b e ace and would most likely speed up finding user input routines

reagards
what's that Smell.... smells like fresh flux and solder fumes...
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Hallo from Poland

Post by dr beep »

Andy Rea wrote: Thu Jul 27, 2017 5:34 pm
sirmorris wrote: Thu Jul 27, 2017 2:41 pm

*note to self - perhaps add a feature in the EO debugger which breaks on an IO operation? Or a ROM call?
a break on IO ($xx),r would b e ace and would most likely speed up finding user input routines

reagards
But then it would also break when in intrupt reading the keyboard.
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: Hallo from Poland

Post by Andy Rea »

yes but as a debugging tool, it would of course not be enabled all the time

regards
what's that Smell.... smells like fresh flux and solder fumes...
Post Reply