No Break please, just a space...
- 1024MAK
- Posts: 5118
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
No Break please, just a space...
No doubt, if it is possible, the answer is out there. It's just that I have not found it (yet)
Having blagged a nice third party replacement keyboard, with a nice (proper) large space bar, the question is:-
How do I stop the BASIC program from those <damn it I just brushed the space bar, again > unwanted breaks into me program?
Mark
Having blagged a nice third party replacement keyboard, with a nice (proper) large space bar, the question is:-
How do I stop the BASIC program from those <damn it I just brushed the space bar, again > unwanted breaks into me program?
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer later in the year.
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer later in the year.
Re: No Break please, just a space...
Usually the only way is to have a pure machine code app. I realise this is utter craziness for most programs.
The truth is that the BASIC interpreter checks for break; there's no way to get around this.
it may be possible to add a hack to the ZXpand overlay which requires shift-space to break?
C
The truth is that the BASIC interpreter checks for break; there's no way to get around this.
it may be possible to add a hack to the ZXpand overlay which requires shift-space to break?
C
Re: No Break please, just a space...
The only way I can think of doing it at the moment is to 'patch' the break(space) detect code in the ROM - I think it was a silly idea to use the space key as break, I'd have preferred to use the EDIT or FUNCTION also as break. I'll have a look into it to see if it's possible to make a reasonably easy plug-in unit to stick on the expansion slot..certainly fairly easy to patch the whole ROM out, and an alternative in(apart from the character patterns)
Re: No Break please, just a space...
According to the disassembly listing of the zx81 rom, the break detect code is from 0F46 to 0f4A, being
LD A,7F
IN A,(FE)
RRA
when break(space) is pressed, carry is reset, but if not pressed is set. So I was thinking if the RRA is changed to SCF (set carry) carry will always be set and break would not be detected!?
After a bit of thinking I have come up with a POSSIBLE (not tested!) way of patching out the rom at the RRA point and replacing it with a SCF ,see the circuit attached - excuse the untidiness as it was hand drawn and photographed on my mobile. No doubt it could be simplified/improved (will look into it further) but it's a start!
LD A,7F
IN A,(FE)
RRA
when break(space) is pressed, carry is reset, but if not pressed is set. So I was thinking if the RRA is changed to SCF (set carry) carry will always be set and break would not be detected!?
After a bit of thinking I have come up with a POSSIBLE (not tested!) way of patching out the rom at the RRA point and replacing it with a SCF ,see the circuit attached - excuse the untidiness as it was hand drawn and photographed on my mobile. No doubt it could be simplified/improved (will look into it further) but it's a start!
- Attachments
-
- disbreak.JPG
- (383.13 KiB) Downloaded 2352 times
Re: No Break please, just a space...
I love it
Been a while since i sat down with a bunch of 74xx's but i reckon it should simplyfy somewhat.
Andy
Been a while since i sat down with a bunch of 74xx's but i reckon it should simplyfy somewhat.
Andy
what's that Smell.... smells like fresh flux and solder fumes...
Re: No Break please, just a space...
If ZXpand is present the fix is very simple; there's a little space free just about the right size for an additional key-press test. The simplest fix is to take SHIFT into account also. SHIFT-BREAK = BREAK.
I expect you have the ability to program EPROMs, Mark? If so there's a new ZXpand firmware about to hit the burner. You could be a beta tester if you like
Gozzo - I'm not trying to rain on your parade - your solution is very smart Those with ZXpand simply now have two options..!
I expect you have the ability to program EPROMs, Mark? If so there's a new ZXpand firmware about to hit the burner. You could be a beta tester if you like
Gozzo - I'm not trying to rain on your parade - your solution is very smart Those with ZXpand simply now have two options..!
Re: No Break please, just a space...
Hi guys,
inspired by this I tried to implement a function like OnError.
It works good but I saw that its not as easy to disable the BREAK with software (as long as there is the original ROM in the machine).
Description of the program follows...
Example showing the interface:
Calculator which does not stop on wrong input:
But there are still some minor drawbacks.
inspired by this I tried to implement a function like OnError.
It works good but I saw that its not as easy to disable the BREAK with software (as long as there is the original ROM in the machine).
Description of the program follows...
Example showing the interface:
Code: Select all
0 REM ONERROR ...
100 CLEAR
110 LET ONERROR=16514
120 REM ONERROR GOTO 9990
130 PRINT USR ONERROR,9990
140 LET A=1/0
150 PRINT B
160 REM ONERROR OFF
170 PRINT USR ONERROR,0
180 LET A=1/0
190 PRINT B
200 STOP
9990 REM ERRORHANDLER
9991 LET NUMBER=PEEK 16434
9992 LET LINE=PEEK 16427+256*PEEK 16428
9991 PRINT "ERROR ";NUMBER;" IN ";LINE
9992 REM GOTO THE FOLLOWING LINE
9992 GOTO LINE+1
Code: Select all
0 REM ONERROR ...
1 PRINT USR 16514,200
100 INPUT A
110 SCROLL
120 PRINT A
130 GOTO 100
200 SCROLL
210 PRINT "ERROR"
220 RUN
- Attachments
-
- onerror.p
- (1.2 KiB) Downloaded 254 times
- 1024MAK
- Posts: 5118
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: No Break please, just a space...
Wow!
Some of you have been busy while I have been occupied elsewhere (and not enjoying my Dell laptop dying that I was using as my main surfing aid, but that's another story).
I do like the ideas, so thank you everyone .
And I do have a ZXpand and a EPROM programmer (that uses one of my still functional computers) and may well give that a go Thanks Mr C.
As I only have one ZXp, but a number of ZX81's, and I have a stash of 74xxx and 74LSxxx logic chips, I may well explore Gozzo's idea as well
I did however think of a simple hardware solution: as the keyboard has some spare keys, it would not take much effort to wire one of these key switches in series with the Space/Break key. The only problem would be remembering to press two keys to get a space
Mark
Some of you have been busy while I have been occupied elsewhere (and not enjoying my Dell laptop dying that I was using as my main surfing aid, but that's another story).
I do like the ideas, so thank you everyone .
And I do have a ZXpand and a EPROM programmer (that uses one of my still functional computers) and may well give that a go Thanks Mr C.
As I only have one ZXp, but a number of ZX81's, and I have a stash of 74xxx and 74LSxxx logic chips, I may well explore Gozzo's idea as well
I did however think of a simple hardware solution: as the keyboard has some spare keys, it would not take much effort to wire one of these key switches in series with the Space/Break key. The only problem would be remembering to press two keys to get a space
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer later in the year.
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer later in the year.
Re: No Break please, just a space...
Another possible circuit - using an EPROM as an address decoder(not sure if that would work, but don't see why not) - only 2 chips needed plus a few other parts!
- Attachments
-
- disbreak2.JPG
- (410.46 KiB) Downloaded 2241 times
Re: No Break please, just a space...
Also have a circuit idea for a 'POKE' switchable version (poke 16417(supposedly unused system variable),128 or higher to disable break, 127 or lower to enable) will post pic soon! I may actually try this one!