Jump to content
IGNORED

Zx Spectrum help: How to use modern cursor keys in Emulator


Recommended Posts

My copy of EightyOne allows you to use the regular cursor keys, but if you must you use SHIFT with 5, 6, 7, 8 to make the cursor move. Try it in a BASIC program first to be sure.

 

10 PRINT"HELLO WORLD"

20 GO TO 10

 

and then use SHIFT+1 to EDIT a line and the other keys to move within the line or move to the next line.

Link to comment
Share on other sites

  • 2 months later...

I have a semi-related question to this.  I am trying to configure a joystick to play the Spectrum version of 1942.  The manual says that the keys and joystick should be defined in the game menus and the options certainly are there.  However, the game simply won't recognize the joystick inputs.  I've tried in Fuse and SpecEmu.  The joystick correctly types numbers in basic when configured as a Sinclair stick 1 or 2.  It also types the cursor keys just fine when configured as a "Cursor" type joystick, so I know the emulator is picking up my USB stick.  It also works in other games.

 

I feel like maybe I am just missing something about how to configure the stick in the menu.  When I'm prompted to pick a stick, I can choose all of the options.  I can even choose Kempston, Sinclair or Cursor from the menu and then the fire button selects the choice.  Next, I have to enter commands for U,D,L,R except pressing those directions on the joystick does nothing.  I tried to enter the corresponding key commands for the Sinclair and Cursor stick, but the game won't accept them (6-0) as valid entries.  Am I missing something simple here?

 

Manual and details 1942 (worldofspectrum.org)

Internet Archive Spectrum TOSEC:  TOSEC: Sinclair ZX Spectrum (2012-04-23) : Free Download, Borrow, and Streaming : Internet Archive

SpecEmu specemu-3.2.b250622.zip – Keybase.pub

Link to comment
Share on other sites

  • 2 months later...
On 6/8/2022 at 4:21 PM, carlsson said:

My copy of EightyOne allows you to use the regular cursor keys, but if you must you use SHIFT with 5, 6, 7, 8 to make the cursor move. Try it in a BASIC program first to be sure.

 

10 PRINT"HELLO WORLD"

20 GO TO 10

 

and then use SHIFT+1 to EDIT a line and the other keys to move within the line or move to the next line.

what about moving a UDG around the screen? I really want to do something outside of text adventures for once. Possibly do a side scroller or something but I need help here.

Link to comment
Share on other sites

This program uses the bas2tap syntax:

10 DATA 130,68,124,186,254,198,124,0,-1
20 LET i=USR "a"
30 READ b:IF b<>-1 THEN POKE i,b:LET i=i+1:GO TO 30
40 LET x=0:LET y=0:LET ox=0:LET oy=0:CLS
50 PRINT AT y,x;"{A}"
60 LET i$=INKEY$:IF i$="" THEN GO TO 60
70 LET x=x-(x>0 AND i$="o")+(x<31 AND i$="p")
80 LET y=y-(y>0 AND i$="q")+(y<21 AND i$="a")
90 IF x<>ox OR y<>oy THEN PRINT AT oy,ox;" ":LET ox=x:LET oy=y
100 GO TO 50

If you want continuous movement, skip the IF statement on line 60 and possibly introduce dx and dy variables that keep track of movement direction.

 

Side scroller probably is a bit much to chew on at the beginning, but step by step you might reach there. Remember though that the ZX Spectrum will always have jerky scrolling unless you become very advanced in your programming. There are other systems (e.g. C64) which are easier to use in that aspect, though usually you still will need to move to machine language if you want it perfectly smooth.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...