Hallo from Poland

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

Hallo from Poland

Post by ilyad731214 » Thu Jul 27, 2017 10:39 am

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: 527
Joined: Fri Nov 06, 2015 4:44 pm
Location: Denmark
Contact:

Re: Hallo from Poland

Post by mrtinb » Thu Jul 27, 2017 11:12 am

Martin
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube

dr beep
Posts: 1049
Joined: Thu Jun 16, 2011 7:35 am
Location: Boxmeer

Re: Hallo from Poland

Post by dr beep » Thu Jul 27, 2017 11:26 am

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.

User avatar
sirmorris
Posts: 2699
Joined: Thu May 08, 2008 4:45 pm
Location: oxon, uk

Re: Hallo from Poland

Post by sirmorris » Thu Jul 27, 2017 12:17 pm

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
--=== ZXpand+ ... A more moderner all-in-one upgrade solution for ZX81 ===--
* SD/MMC storage * 32K Hires-capable RAM * AY sound chip * Joystick port * Serial *
* BASIC enhancements - plug & play * Reset button * Auto-boot facility *

ilyad731214
Posts: 12
Joined: Thu Jul 27, 2017 8:43 am

Re: Hallo from Poland

Post by ilyad731214 » Thu Jul 27, 2017 1:19 pm

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

User avatar
sirmorris
Posts: 2699
Joined: Thu May 08, 2008 4:45 pm
Location: oxon, uk

Re: Hallo from Poland

Post by sirmorris » Thu Jul 27, 2017 1:33 pm

--=== ZXpand+ ... A more moderner all-in-one upgrade solution for ZX81 ===--
* SD/MMC storage * 32K Hires-capable RAM * AY sound chip * Joystick port * Serial *
* BASIC enhancements - plug & play * Reset button * Auto-boot facility *

User avatar
sirmorris
Posts: 2699
Joined: Thu May 08, 2008 4:45 pm
Location: oxon, uk

Re: Hallo from Poland

Post by sirmorris » Thu Jul 27, 2017 1:41 pm

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?
--=== ZXpand+ ... A more moderner all-in-one upgrade solution for ZX81 ===--
* SD/MMC storage * 32K Hires-capable RAM * AY sound chip * Joystick port * Serial *
* BASIC enhancements - plug & play * Reset button * Auto-boot facility *

User avatar
Andy Rea
Posts: 1268
Joined: Fri May 09, 2008 1:48 pm
Location: notts UK

Re: Hallo from Poland

Post by Andy Rea » Thu Jul 27, 2017 4:34 pm

sirmorris wrote:
Thu Jul 27, 2017 1: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
6 x ZX81, 1 x TS1500 , 1 x +3e, 1 x timex 2040 printer, 1 x timex 2020 cassette deck, siclair printer and some spectrum

dr beep
Posts: 1049
Joined: Thu Jun 16, 2011 7:35 am
Location: Boxmeer

Re: Hallo from Poland

Post by dr beep » Thu Jul 27, 2017 9:48 pm

Andy Rea wrote:
Thu Jul 27, 2017 4:34 pm
sirmorris wrote:
Thu Jul 27, 2017 1: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: 1268
Joined: Fri May 09, 2008 1:48 pm
Location: notts UK

Re: Hallo from Poland

Post by Andy Rea » Thu Jul 27, 2017 9:54 pm

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

regards
6 x ZX81, 1 x TS1500 , 1 x +3e, 1 x timex 2040 printer, 1 x timex 2020 cassette deck, siclair printer and some spectrum

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest