ZX Review #3-4
22 июля 1997

Forum - A. Gura. Code programmer.

<b>Forum</b> - A. Gura. Code programmer.
(C) Andrew Gura (EAGLE SOFT),
Kurgan.


   One article I read REVIEW proposal wording in
which was proposed to create
a code for demomeykerov. I think it needs a code of programmer 
at all and I think that my code will be an example to all 
programmers and adopted as a basis.



    Switching pages of RAM



   Switch the page better
on port # 7FFD, rather than half # FD. This way you can avoid 
many problems of compatibility of programs with other 
computers. Take a notorious example INSULT MEGADEMO. This 
program comes on PROFI, PENTANGON 128, but does not want to 
work on SCORPION'e, and this angered many SPECCYUSER'ov (I 
think the owners SCORPION'ov I understand).



          PORT # 7FFD


              Z Y X X X



  X-RAM, the page number from 0 to
7, is connected with the address # C000;

  Y-switching of the screen, Y = 0 -
# 4000, Y = 1 - # C000 (page);

  Z-switching ROMs, Z = 0 -
ZX128, Z = 1 - ZX48;


  Turn to port to switch pages easier to read
as follows:
140.

    LD BC, # 7FFD

    LD A, N +16; N-number of the page

    OUT (C), A
2

  At the time of changing the contents
port interrupts must forbid.


          MANAGEMENT



   KEMPSTON need to poll for
Port # 1F, rather than # DF, as
done on the ZX-NEXT. But on the
Port # DF (for those who do not know) is interrogated FULER 
joystick. 


          PORT # 1F


             F U D L R


F-FIRE-fire;
U-UP-up;
D-DOWN-down;
L-LEFT-left;
R-RIGHT-right.


   Appeal to the port is
by mnemonic IN.


   SINCLAIR 1 or 1 INTERFACE
here has the following keys:
1-LEFT; two-RIGHT; three-DOWN; 4-UP;
5-FIRE.

   SINCLAIR INTERFACE 2 or 2:
6-LEFT; 7-RIGHT; 8-DOWN; 9-UP;
0-FIRE.

   CURSOR: 5 + CS-LEFT; 6 + CS-DOWN;
7 + CS-UP; 8 + CS-RIGHT, and CS
are not obligatory, and its absence, even comfortable, but not 
in all cases.



   KEYBOARD: here it is better to stick sleduyushego standard:
O-LEFT; P-RIGHT; Q-UP; A-DOWN;
M-FIRE. Poll is on port # FE.


           PORT # FE


          Y X X X X X



   The survey produced the following
as follows:
142.

  LD A, N; N-number poluryada

  IN A, (# FE)
2

            POLURYADY


      March 1 ... 5 6 ... 0 4

      2 Q. .. T Y. .. P 5

      1 A. .. G H. .. ENT 6

      0 CS ... V B. .. SPC 7



  0 - # FE

  1 - # FD

  2 - # FB

  3 - # F7

  4 - # EF

  5 - # DF

  6 - # BF

  7 - # 7F


  Poluryada port address can be calculated by the formula
 255-2 №, where n - number poluryada.


        Booting from CD



   When you boot from a disk is strictly forbidden to contact
non-standard entry points TRDOS and use the method of 
programming the SH, as all leads to an inoperable programs at 
boot from the HDD, though it looks very impressive.

Again, take for example INSULT
MEGADEMO: I say with confidence that this program will not boot 
from the hard drive. 

   You also can not bind to a specific program loaders
version of TR-DOS - it also leads to
incompatibility and dissatisfaction.
One would like to take your computer with
the old version of TR-DOS and throw it out the window. Perhaps
so did the fans of racing,
when they tried to get LOTUS
version of the Laptev, because they have version 5.03, but the 
game is only on the 5.04.


   When loading is undesirable
that a ship on the disk (so
no longer notice the owner
PC).


   TIMING AND INTERRUPT



   In all the programs when you use the interrupt
IM2 need to create the address table, consisting of 257 
identical bytes (where do these bytes, I think, you know). Why? 
- You ask, "It's waste of memory! ". An

No! - I can tell. It is believed that
with the data bus comes # FF, but
all Western programmers use a table.

  Undesirable to send a vector
interrupt number, which contribute to the Treatment of address 
to Rom, namely the number of 0-63, although

screen and the area of ​​system variables is not worth touching.

   All effects on the screen is better
synchronized with respect to
screen. For example, again take INSULT. In the first part
scrolling when the TURBOrezhime twitches. In the second part, 
everything happens so fast that it does not have time to read 
running line, and the music plays faster. 


        "PORT attribute



  Never use your
programs port attributes # FF,
since it is an imaginary port. For
example, take the game TOP GUN.


         OTHER GOODIES



   The games definitely need to pause for a certain key is 
pressed and shipping situation at any time of the game, each 
situation must have its specific name.


   Who has the additions to my code, write to the editor ZX
REVIEW.

********************************





Other articles:

TR-DOS for beginners - Part 1.

Authoring - General Sound - Multimedia for the ZX Spectrum!

Business Card - Introducing the new electronic journal "Major Wares" (c) Codebusters & VMG

Computer novella - Knight Lore "legends of chivalry times."

New Programs - I. Roshchin. HELP_Z80. Davydov. Catalog's Base v1.8.

description of the shell of the journal "ZX-REVIEW"

Crossing Dragon - Aavlon, Castle of Dreams, Erik the Viking.

Crossing Dragon - Eureka!, Eye of Bain, Kentilla.

Crossing - Sherlock, Apollo, Shadows of Mordor, Rigels Revenge, Temple of Terror, ID, That's the Spirit, Return to Ithaka.

Retro - Dzh.Hardman, E. Hyuzon. Top 40 procedures.

Expert Tips - Castle Master.

Expert Tips - Firelord.

Expert Tips - Stonkers.

Forum Games - Insult Megademo, Catch 23, Livingstone, Rock Star ate my Hampster, UFO-2: Devils of the Abyss, Terminator 2, Venturama, The Spririts, Nipper, Sweewo'S World, King's Bounti -2, Hacker 2, Black Magic, Satcom, Star Heritage.

Forum - A. Gura. Code programmer.

Forum - A. Strelnikov. Prospects of development of ZX Spectrum.

Forum - Davydov. According to materials published in the ZX-REVIEW: Some issues related to autostart BASIC programs. Redefine Keys. How to print 42 characters per line. The procedure of multiplication HL = B * C. Refinement cloning downloaders. Mini-driver disk.

Forum - With 'Light'. Music processor ZX-Speccy.

Forum - Dmitry Fyodorov: Print images with a mask with pixel precision. Algorithm for calculating the address coordinates to within a pixel.

Forum - I. Roshchin. Sharing ZX ASM 3.0 and STS 5.1.

Forum - M. Bekarev. The calculation of the address display area of familiarity, and vice versa.

Forum - VP Fedin. Refinement Profi for conflict-free peripheral connectivity.

Forum - S. Astrov. Pseudorandom number generator.

reader-reader - V. Sirotkin. Protection program (look at the problem).

reader-reader - I. Roshchin. Display driver for the computer, "Pentagon-128.

Studies - A. Savinov: The procedure for displaying a double-height characters. Procedure "dissolution" of characters.

Studies - A. Urzha. The procedure for drawing a circle.

Studies - V. Sirotkin. Program checksum.

Studies - E. Volchkov. Improvement routines address calculation system on display file.

Studies - E. Frost. Running line.

Studies - I. Komandin. The program display screen.

Studies - I. Roshchin. Two graphic effect.

Studies - M. Lazutov: The modernization program font. Program encode / decode block codes. The effect of the attributes.

Studies - O. Smolyankin: Procedures for cleaning the screen. Output of text messages on the screen.


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
Test - Answers to Test 2 of the first number.
Birthday - congratulations on birthdays.
Poems - "Blues civil war."
Iron - an overview of the microprocessor Zilog Z380, continued.

В этот день...   26 February