ZX Hard #00
31 августа 1998 |
|
Subtleties poll Kempston Rats - a glitch Kepston Mouse.
Subtleties of polling Kempston rats;) (C) VTS'98 mouse included - well, not included - is bad. (C) Vladimir Mayakovsky, Demon, VTS. WELCOME TO THE HELL, DEAR USER without KeMpStOnE-mouse. (C) Demon (ZX-Element # 1), VTS. I want to tell you about a sad fact - I have no kempstone-joystick'a. -So what, and I do not kempstone-mouse, -I will answer (VTS) ... Something like this started in an instructive article in the ZX-Elemement # 1 on how to interrogate Kempston joystick. Apparently, the mouse occur much more frequently and joysticks should be for everyone, because because of no mouse (on every wheelbarrow, where k.joys. decrypted by # FD) magazine a little bit (to put it mildly) is buggy. Only, plzzz, do not take it for hitting! I just really wanted to read magazine (what, you like to go for 20km to the city to another to read it half of 'passing' and the second with a push on the joystick 'left' and 'right' [later however, using a soldering iron ;-)]). I am also sure that this bug has already caught I am writing this nonsense to eliminate further confusion. In fairness, I must say that This sin is not just you. So get down to business. On machines with a 'firm' part-time decoding for # DF, rather than # 1F in the absence of mouse (the ports are in the low byte address # DF) instead of 'mouse' disk imaging will read the joystick. Well, if reading the origin of glitches is not happening (sorry, due to lack of entogo devaysa not familiar with his in-depth interviews, but the conversation not about that at all), then when reading keys the fun begins. Namely: the mouse buttons are passive in 1, and active at 0, y joystick is all the way around! Therefore when lie under the table joystick prog track defunct rat catching idiotic intent user to find the 'any key' by pianist I mean, the press of a pressed :-) The result is ever pressed 'Fire' and 'abolition' (good, middle button is not used for 'lethal' ;-) functions). The effect, of course, entertaining, but I took the magazine and not DeMouy some nd. Once I realized this, I immediately understood the method of treatment: press 'Left' and 'right' to stick (good, I have it not rychazhkovy;)) then I dovesil pair of jumpers and revised all buggy prog;). Nevehavshim explains the: left and right - Bits 0.1 joystick - Correspond to the left and right buttons mouse (bottom - bit 2 - middle). Just do not forget to remove these jumpers :-). Zhelezyachny solution method - add a couple of LL1 elements or diodes for decryption by # 1F - not recommended, because such prog is not so much, and indeed, it is problem coders, not users. Incidentally, this problem manifests itself on KAY'e and Scorp'e. Therefore the majority of mouse pro - from Peter - Works correctly. Well, now move on to dessert - the one why you and read all of this pun, I mean _KAK_pravilno_izbavitsya_ _от_этого_принеприятнейшего_известия_. Take a nd St. Petersburg myshininy prog and run it (eg, ZX-Format). Now pay attention to seemingly useless pribambas - test the joystick and mouse. Although long overdue to ask ourselves: where are the tests of memory, a turbo and brakes, pseudo-ROMs and shadow monitors ;-). We associate this fact with the presence of Kempston-test, for example, in the MMD. EVERYTHING! Now you can cry "Eureka!" If you do not Archimedes, read on. In short, the need to test the presence of the mouse! And if you click no, it disables the survey. And this is not easy, but very simple. Maybe two versions: a simple and wrong. To start analyze incorrect. LD A, # FA; read IN A, (# DF); button. AND% 00000111; Masquerage them. INC A; # FF +1 = 0 JP NZ, mouse_off; ... mouse_on ... Principle: if a mouse, its port of buttons will contain 1 to level 3 ... 7; after installing the bits to 1 (AND% 00000111) into the ACC. obtain # FF, and after INC A - 0 and the flag set Z. If the joystick, then bits 3 ... 7 reset! Why wrong? a). There is a mouse, unstable data bus and from anywhere in bits nd 3 ... 7 pressure on at least one 0. The result - the mouse is resting. b). No mouse, Kempston (joystick) wrong (set bits 5 ... 7), user puts pressure on all (or at least used 'fire' and 'Up') four-way controller (nazlo. ..:*)) The result - the presence of mouse (+ glitches ...). In the second method, you should read three bytes of mouse and if they are all equal, then with probability 99. (9)% mouse No: a). read all 3 bytes of the joystick. b). Read unstable bus. c). Read stable bus. The remainder (tiny) likelihood of misidentification: a). Unstable bus had time to change between readings. b). Shustry user managed to change the status joystick between the readings:-On. c). user has managed to: *)) put myshu so that x = y = keys !!!... Well, that's AFM: LD BC, # FADF IN A, (C) INC B; B = # FA +1 = # FB IN D, (C) LD B, # FF IN E, (C) ; Read all 3 bytes. CP D JP NZ, mouse_on CP E JP NZ, mouse_on mouse_off ... Well that's all :-). PS: Though not hurt to add a manual correction of the test - both in the same ZF. 12.08.98 22:19 msk is-dos
Other articles:
Similar articles:
В этот день... 1 February
Joint #01,
Spectrum Magazine #02,
Screamergy #02,
Scream #03,
ZX Time #07,
TargeT #08,
Black Crow #05,
X-Magazine #18,
KrNews #13,
Adventurer #12,
Micro #26,
C-Net Week #20,
X-Magazine #09,
Zodiac #01,
Think #25,
Default #01,
Hobby #01,
Adventurer #07,
Gorodok #03,
C-Net Week #10,
Cheat #01,
SpecInfo #04,
Echo #04,
X-Files #01,
X-Files #01,
Nicron #18,
ZX News #01,
Spectrofon #02