(C) Ivan Roshchin, Moscow, 1998
If you have seen the "ART VISION" demo, you remember that in the last part there is an attribute text "intel outside" that moves. Since the text is attribute-based, it moves with a discreteness of 8 pixels (1 character space), which does not look very nice. I wrote a program that essentially implements the same full-screen, "interrupt-fitting" effect, but now the movement is pixel-by-pixel, which looks incomparably better. The program is equipped with detailed comments, so understanding it will not be a big problem.
If you want to see how this effect looked "in the original" - just remove two lines marked with "*".
The image of size 64*64 character spaces is taken from the "ART VISION" demo and is located in the PICTURE array. Each character space is encoded with one bit, so the entire image occupies 512 bytes.
The trajectory of movement is defined using the CRDS array, which contains 100 elements of the following type:
1 byte - offset (in character spaces) of the left side of the fragment relative to the left edge of the image (see fig.)
1 byte - offset (in pixels, modulo 8) of the left side of the fragment relative to the left edge of the image.
1 byte - offset (in character spaces) of the top side of the fragment relative to the top edge of the image.
1 byte - offset (in pixels, modulo 8) of the top side of the fragment relative to the top edge of the image.
┌──────────────────>x
│ │── entire image
│ ┌───────┐ │
│ │ │ │
│ │ │───────── displayed
│ │ │ │ fragment
│ └───────┘ │
│ │
│ │
│─────────────────┘
y
The number of elements in the array and their values can be changed, thereby defining a new trajectory of movement. So, here is the program itself:
CALL MAKEADR ;Preparation...
CALL UNPACK
CALL CLS
M1 LD IX,CRDS ;address of the table
LD D,100 ;number of coordinates
;in the table
M2 LD BC,4
LD A,(IX) ;Taking
LD (XATR),A ;coordinates
LD A,(IX+1) ;of the displayed window
LD (XPIX),A ;*
LD A,(IX+2)
LD (YATR),A
LD A,(IX+3)
LD (YPIX),A ;*
ADD IX,BC ;Increase address
PUSH IX
PUSH DE
CALL OUTSCR ;Output to screen
POP DE
POP IX
XOR A
IN A,(254)
CPL
AND 31 ;If something
RET NZ ;is pressed, exit
DEC D ;Continue...
JR NZ,M2
JR M1
;***************************************
;Proc. OUTSCR outputs the fragment
;of the image to the screen.
;Input: XATR,XPIX - offset of the left
;side of the fragment relative to
;the left edge of the image (XATR*8+XPIX
;pixels);
;YATR,YPIX - offset of the top side
;of the fragment relative to the top edge
;of the image.
OUTSCR DI
LD (TO_Q+1),SP ;Saved SP
LD SP,TAB_SCR
;SP points to the beginning of the table of addresses
;of screen rows. Each time
;the POP command is executed, the address
;of the next row is removed from the stack.
LD A,(XPIX)
ADD A,A
ADD A,A
ADD A,A
ADD A,A
ADD A,#80
LD H,A
LD L,0
LD A,(YATR)
LD D,A
LD E,0
SRL D
RR E
SRL D
RR E
ADD HL,DE
LD D,0
LD A,(XATR)
LD E,A
ADD HL,DE
POP DE ;#4000
LD BC,-#10
EX DE,HL
ADD HL,BC
EX DE,HL
LD (LP4+1),DE
;HL points to the image row;
;DE - to the address in video memory, where
;this row needs to be sent
;(in this case, this is the very top
;row of the screen, with address #4000).
LDI:LDI:LDI:LDI:LDI:LDI:LDI:LDI
LDI:LDI:LDI:LDI:LDI:LDI:LDI:LDI
LDI:LDI:LDI:LDI:LDI:LDI:LDI:LDI
LDI:LDI:LDI:LDI:LDI:LDI:LDI:LDI
;We send the remaining (7-YPIX) rows:
LD (HL_S1+1),HL
LD A,(YPIX)
LD B,A
LD A,7
SUB B
JP Z,SCRH
LP4 LD HL,0
POP DE
LD BC,-#10
EX DE,HL
ADD HL,BC
EX DE,HL
LD (LP4+1),DE
LDI:LDI:LDI:LDI:LDI:LDI:LDI:LDI
LDI:LDI:LDI:LDI:LDI:LDI:LDI:LDI
LDI:LDI:LDI:LDI:LDI:LDI:LDI:LDI
LDI:LDI:LDI:LDI:LDI:LDI:LDI:LDI
DEC A
JP NZ,LP4
;Now we send another 23 times 8 rows.
SCRH LD YL,23 ;Counter
HL_S1 LD HL,0 ;Address of the next
LD BC,#40 ;row to be sent
ADD HL,BC ;
LD (HL_S1+1),HL
;Preparing addresses for transfer:
EX DE,HL ;Saved HL
LD C,#10
POP HL ;Where to send
LD (SP_0+1),HL
ADD HL,BC
LD (SP_01+1),HL
POP HL ;To the row below
LD (SP_1+1),HL
ADD HL,BC
LD (SP_11+1),HL
POP HL ;To the row below
LD (SP_2+1),HL
ADD HL,BC
LD (SP_21+1),HL
POP HL ;To the row below
LD (SP_3+1),HL
ADD HL,BC
LD (SP_31+1),HL
POP HL ;To the row below
LD (SP_4+1),HL
ADD HL,BC
LD (SP_41+1),HL
POP HL ;To the row below
LD (SP_5+1),HL
ADD HL,BC
LD (SP_51+1),HL
POP HL ;To the row below
LD (SP_6+1),HL
ADD HL,BC
LD (SP_61+1),HL
POP HL ;To the row below
LD (SP_7+1),HL
ADD HL,BC
LD (SP_71+1),HL
LD (PUT_SP+1),SP ;Save SP
EX DE,HL ;Restored HL
LD BC,-#20
ADD HL,BC
LD SP,HL
POP AF ;Took the first
POP BC ;16 bytes
POP DE ;of the transferred
POP HL ;row
EXX
POP BC
POP DE
POP HL
POP IX
LD (TWO+1),SP
SP_0 LD SP,0 ;Recording them
PUSH IX ;to the screen
PUSH HL ;in 8 adjacent
PUSH DE ;rows
PUSH BC
EXX
PUSH HL
PUSH DE
PUSH BC
PUSH AF
EXX
SP_1 LD SP,0
PUSH IX
PUSH HL
PUSH DE
PUSH BC
EXX
PUSH HL
PUSH DE
PUSH BC
PUSH AF
EXX
SP_2 LD SP,0
PUSH IX
PUSH HL
PUSH DE
PUSH BC
EXX
PUSH HL
PUSH DE
PUSH BC
PUSH AF
EXX
SP_3 LD SP,0
PUSH IX
PUSH HL
PUSH DE
PUSH BC
EXX
PUSH HL
PUSH DE
PUSH BC
PUSH AF
EXX
SP_4 LD SP,0
PUSH IX
PUSH HL
PUSH DE
PUSH BC
EXX
PUSH HL
PUSH DE
PUSH BC
PUSH AF
EXX
SP_5 LD SP,0
PUSH IX
PUSH HL
PUSH DE
PUSH BC
EXX
PUSH HL
PUSH DE
PUSH BC
PUSH AF
EXX
SP_6 LD SP,0
PUSH IX
PUSH HL
PUSH DE
PUSH BC
EXX
PUSH HL
PUSH DE
PUSH BC
PUSH AF
EXX
SP_7 LD SP,0
PUSH IX
PUSH HL
PUSH DE
PUSH BC
EXX
PUSH HL
PUSH DE
PUSH BC
PUSH AF
EXX
TWO LD SP,0
POP AF ;Took the second
POP BC ;16 bytes
POP DE ;of the transferred
POP HL ;row
EXX
POP BC
POP DE
POP HL
POP IX
SP_01 LD SP,0
PUSH IX ;Recording...
PUSH HL
PUSH DE
PUSH BC
EXX
PUSH HL
PUSH DE
PUSH BC
PUSH AF
EXX
SP_11 LD SP,0
PUSH IX
PUSH HL
PUSH DE
PUSH BC
EXX
PUSH HL
PUSH DE
PUSH BC
PUSH AF
EXX
SP_21 LD SP,0
PUSH IX
PUSH HL
PUSH DE
PUSH BC
EXX
PUSH HL
PUSH DE
PUSH BC
PUSH AF
EXX
SP_31 LD SP,0
PUSH IX
PUSH HL
PUSH DE
PUSH BC
EXX
PUSH HL
PUSH DE
PUSH BC
PUSH AF
EXX
SP_41 LD SP,0
PUSH IX
PUSH HL
PUSH DE
PUSH BC
EXX
PUSH HL
PUSH DE
PUSH BC
PUSH AF
EXX
SP_51 LD SP,0
PUSH IX
PUSH HL
PUSH DE
PUSH BC
EXX
PUSH HL
PUSH DE
PUSH BC
PUSH AF
EXX
SP_61 LD SP,0
PUSH IX
PUSH HL
PUSH DE
PUSH BC
EXX
PUSH HL
PUSH DE
PUSH BC
PUSH AF
EXX
SP_71 LD SP,0
PUSH IX
PUSH HL
PUSH DE
PUSH BC
EXX
PUSH HL
PUSH DE
PUSH BC
PUSH AF
EXX
PUT_SP LD SP,0 ;Restored SP
DEC YL ;Decreasing the counter
LD A,YL
AND A
JP Z,END_ML ;Output 23 rows
;After outputting 12 rows, wait
;for an interrupt. This is needed for synchronization
;with the beam's movement. When the beam draws the upper
;part of the screen, the program outputs
;the image to the lower part, and vice versa.
CP 12
JP NZ,HL_S1
LD HL,0
ADD HL,SP
LD SP,(TO_Q+1)
PUSH IY
LD IY,#5C3A
EI
HALT
DI
POP IY
LD SP,HL
JP HL_S1
;If YPIX0, need to output the last
;rows at the very bottom of the screen:
END_ML LD A,(YPIX)
AND A
JP Z,TO_Q
LD HL,(HL_S1+1)
LD BC,#20
ADD HL,BC
POP DE
LD BC,-#10
EX DE,HL
ADD HL,BC
EX DE,HL
LD (LP5+1),DE
LDI:LDI:LDI:LDI:LDI:LDI:LDI:LDI
LDI:LDI:LDI:LDI:LDI:LDI:LDI:LDI
LDI:LDI:LDI:LDI:LDI:LDI:LDI:LDI
LDI:LDI:LDI:LDI:LDI:LDI:LDI:LDI
;We send the remaining rows:
LD A,(YPIX)
DEC A
JP Z,TO_Q
LD B,A
LP5 LD HL,0
POP DE
LD BC,-#10
EX DE,HL
ADD HL,BC
EX DE,HL
LD (LP5+1),DE
LDI:LDI:LDI:LDI:LDI:LDI:LDI:LDI
LDI:LDI:LDI:LDI:LDI:LDI:LDI:LDI
LDI:LDI:LDI:LDI:LDI:LDI:LDI:LDI
LDI:LDI:LDI:LDI:LDI:LDI:LDI:LDI
DEC A
JP NZ,LP5
TO_Q LD SP,0 ;Restored SP
LD IY,#5C3A ;---/--- IY
EI
RET ;Exit from the procedure
;***************************************
;Proc. MAKEADR creates a table with
;addresses of all 192 screen rows,
;where each address is increased by #10.
;Address of the table - TAB_SCR.
MAKEADR LD HL,TAB_SCR
LD DE,#4010
LD B,192
LP_MAKE LD (HL),E
INC HL
LD (HL),D
INC HL
CALL DOWN_DE
DJNZ LP_MAKE
RET
DOWN_DE INC D
LD A,D
AND 7
RET NZ
LD A,E
SUB #E0
LD E,A
RET NC
LD A,D
SUB 8
LD D,A
RET
;***************************************
;Proc. UNPACK unpacks the image
;at address PICTURE to #8000-#FFFF
UNPACK LD HL,#8000
LD DE,PICTURE
LP_UP1 LD B,8
LD A,(DE)
LP_UP2 RLA
LD C,#FF
JR C,TO_MEM
LD C,0
TO_MEM LD (HL),C
INC HL
DJNZ LP_UP2
INC DE
LD A,H
CP #90
JR NZ,LP_UP1
LD HL,#8FFF
LD DE,#9FFF
AND A
PUSH AF
LP_UP3 POP AF
LD A,(HL)
RLA
PUSH AF
LD (DE),A
DEC HL
DEC DE
LD A,L
CP #FF
JR NZ,LP_UP3
LD A,H
AND #0F
CP #0F
JR NZ,LP_UP3
LD BC,#2000
ADD HL,BC
EX DE,HL
ADD HL,BC
EX DE,HL
LD A,D
CP #0F
JR NZ,LP_UP3
POP AF
RET
;***************************************
;Proc. CLS sets the attributes:
CLS LD HL,#5800
LD (HL),5
LD DE,#5801
LD BC,#2FF
LDIR
RET
;****************************************
;Image #40x#40 = #1000 bits = #200 bytes
PICTURE
DB #00,#00,#00,#00,#7F,#F0,#00,#00
DB #00,#00,#00,#1F,#FF,#FF,#80,#00
DB #00,#00,#00,#7F,#FF,#FF,#E0,#00
DB #00,#00,#03,#FF,#FF,#FF,#FC,#00
DB #00,#00,#1F,#FF,#FF,#FF,#FE,#00
DB #00,#00,#3F,#FF,#FF,#FF,#FE,#00
DB #00,#00,#FF,#FE,#1F,#FF,#FC,#00
DB #00,#01,#FF,#F0,#03,#FF,#FC,#00
DB #00,#07,#FF,#00,#00,#1F,#F8,#00
DB #00,#0F,#F8,#00,#00,#0F,#F8,#00
DB #00,#1F,#C0,#00,#00,#C1,#F0,#00
DB #00,#3F,#00,#18,#00,#E0,#70,#00
DB #00,#7E,#00,#18,#01,#E0,#20,#00
DB #00,#F0,#00,#18,#01,#E0,#00,#00
DB #01,#F0,#01,#FF,#81,#C0,#04,#00
DB #03,#E7,#03,#FF,#31,#C0,#0E,#00
DB #03,#C7,#00,#1C,#79,#C0,#0F,#00
DB #07,#87,#00,#18,#F9,#C0,#0F,#80
DB #0F,#00,#5E,#19,#99,#C0,#1F,#C0
DB #0F,#0E,#7E,#19,#99,#C0,#1F,#C0
DB #1E,#0E,#67,#39,#B1,#C0,#3F,#F0
DB #1C,#0E,#67,#31,#B1,#C0,#3F,#F0
DB #1C,#0C,#67,#33,#E1,#C0,#0F,#F8
DB #38,#0C,#67,#33,#C1,#C0,#07,#F8
DB #30,#1C,#67,#33,#89,#C0,#03,#F8
DB #30,#18,#67,#31,#99,#80,#01,#FC
DB #30,#18,#67,#31,#99,#80,#00,#FC
DB #60,#18,#07,#31,#F1,#80,#E0,#7C
DB #60,#18,#03,#30,#E1,#80,#E0,#7E
DB #60,#00,#00,#30,#00,#00,#E0,#3E
DB #E0,#00,#00,#00,#00,#00,#E0,#3E
DB #E0,#00,#00,#00,#00,#00,#E0,#1E
Contents of the publication: Adventurer #08
- От автора - Shaitan
Technical details of a new program interface for ZX Spectrum. Discusses improvements and features like scrolling and color change. Provides keyboard and button navigation instructions.
- От автора
Introduction by the author and editorial team details.
- Presentation
The article presents a software installer for creating autorun disks and introduces a new adventure game created with QUILL by Dr. Laser.
- Presentation of TRICK Software
The article presents TRICK, a new software for program protection developed by Eternity Industry, and discusses its beta and commercial versions. The author, Alexander Kalinin (aka Paracels/EI), addresses previous shortcomings in the software and emphasizes its improved interface. It includes purchase details for the software and invites readers to request it.
- Presentation
The article provides a detailed user manual for HELP_Z80, a free utility for ZX Spectrum that serves as an electronic guide for Z80 microprocessor commands. It outlines how to load and use the software, including command explanations, search functions, and integration with assemblers. Additionally, it includes memory distribution, operational features, and references for further reading.
- Interface
The article discusses reader feedback on the magazine's interface, addressing concerns about pricing and software trends in the ZX Spectrum community. It features a letter from a reader expressing thoughts on game pricing and the declining number of users on the platform. Additionally, there are discussions on software developments and user engagement.
- Interface
The article shares the author's experiences after purchasing an Amiga, comparing it with a PC, and discussing its usability for games, graphics, and music, while noting some software limitations.
- Interface
The article discusses user support issues faced by hardware manufacturers SCORPION and NEMO for ZX Spectrum devices. It critiques SCORPION for poor customer service despite being a market leader, while praising NEMO for responsive support. The author expresses concerns about the overall market direction for ZX Spectrum hardware.
- Interface
Article discusses the future of the Spectrum platform, addressing user demographics, software production challenges, and hardware evolution possibilities.
- Interface
Article discusses the frustrations of a Speccy user regarding hardware issues, the challenges of modern computing, and the dedication to maintaining the Speccy platform.
- Interface
Статья рассматривает жизнь и судьбы пользователей ZX Spectrum, включая личные воспоминания автора о друзьях и их взаимодействии с компьютерами.
- System
The article reviews various software for ZX Spectrum, including text editors, audio players, and graphic utilities. It provides independent opinions on their features and usability, highlighting both strengths and weaknesses. The piece emphasizes the evolution and improvement of software tools available for this classic platform.
- Overview of Games
Overview of notable games for ZX Spectrum, highlighting their graphics, sound, and gameplay mechanics. Each entry includes a brief summary and rating. Recommended for fans of retro gaming.
- Review of Demos
The article reviews demo versions of various games, highlighting their potential and unique features. It emphasizes the scarcity of such releases in the market and evaluates the quality and gameplay mechanics of selected titles. The author shares insights into the progress and expectations for future full versions of these games.
- Guests
The article discusses the formation and activities of the Eternity Industry group, its members, projects, and future plans for releases and competitions.
- Гости - Dr. John
An interview with Felix from Virtual Brothers discusses his transition from ZX Spectrum to PC, development of the game 'Winnie the Pooh', and future plans.
- Guests
Interview with the musicians Mарат and Демон from the band 'Disgust', discussing their musical evolution, influences, and perspectives on life and creativity.
- Promotion
The article provides a detailed manual for the game 'ENCYCLOPEDIA of WAR', explaining army selection, unit types, and battle mechanics.
- Promotion
The article provides a walkthrough for the game, detailing necessary items and strategies for progressing through various challenges, including dealing with dinosaurs and navigating villages.
- Promotion
Статья представляет собой обзор arcade adventure игры 'ELOPEMENT' от Omega HG, выделяя ее особенности и советы по прохождению.
- Promotion
Статья описывает текстовую адвентюру 'Остров тьмы' на QUILL, предлагая советы для игроков. Упоминаются механики и персонажи, включая загадки и взаимодействия. В конце представлена карта острова.
- Promotion of 'Knightmare'
The article describes the game 'Knightmare', detailing its commands, gameplay mechanics, and initial quests. Players control a knight who must interact with characters and solve puzzles to progress. It serves as a manual for navigating the game's environment and objectives.
- Experience Exchange
The article critiques the adventure game 'Island of Darkness' by Paul Moskow, highlighting its illogical design, lack of detailed item descriptions, and absence of helpful hints for players.
- Experience Exchange
The article provides a detailed manual for enhancing the ZX ASM 3.0 assembler, introducing debugging features and functionalities for better program execution control on ZX Spectrum.
- Experience Exchange
The article describes a phenomenon observed with the ZX Spectrum video controller, where switching between two screens can create unexpected visual artifacts. It outlines a specific program that demonstrates this effect through rapid screen toggling. The author discusses the implications and potential applications of this behavior.
- Обмен опытом - Иван Рощин
The article is a programming guide on porting the 'iris.ss' screen saver effect from Dos Navigator to ZX Spectrum, including source code and modification tips.
- Обмен опытом - Иван Рощин
Description of the OPEN_W procedure to create window borders. Includes details on customization of symbols and dimensions. Utilizes PRSYM for symbol printing.
- Обмен опытом - Maximum
Introduction to long integer operations for game development on ZX Spectrum, including addition, subtraction, and conversion to ASCII.
- Experience Exchange
The article discusses the customization of the ART STUDIO graphic editor by creating additional modules that enhance its functionality, including features like music playback and cursor coordinates display.
- Experience Exchange
The article describes a program developed to improve the visual quality of a pixel-by-pixel moving attribute message on ZX Spectrum. It provides details on the implementation, including the use of data arrays for motion trajectory and image rendering. The program includes comments for easier understanding and can be modified for different effects.
- Оттяг
The article features humorous sketches and commentary on various aspects of life and technology, including anecdotes about a fictional character's experience with a Pentium processor.
- Pharmacist Test
The article presents humorous tests designed to identify whether someone is a real pharmacist or a fraud, featuring situational questions and scoring to gauge knowledge of pharmacy.
- Oddities and Self-Reflection in 'Оттяг'
The article 'Оттяг' presents a humorous and critical self-reflection of the author, exploring various life experiences and quirks that highlight his unusual personality traits.
- Humorous Quiz: Assess Your Sense of Humor
The article presents a humorous quiz to assess one's sense of humor and sexual attitudes through various situational questions, revealing absurd and comedic perspectives.
- Student Types Quiz
The article presents a humorous quiz to determine what kind of student you are, ranging from a party animal to a diligent scholar. It features a series of questions regarding typical student activities and responses. The results categorize students based on their score, from carefree to nerdy.
- How to Properly Torture Windows 95 - Maximum
Статья описывает иронический подход к установке и эксплуатации операционной системы Windows 95, включая способы ее 'мучения' и троллинга. В тексте используются гиперболизированные примеры взаимодействия с ОС для создания комичного эффекта. Это развлекательный материал с элементами юмора.
- Ottyag
The article is a humorous narrative featuring Winnie the Pooh and his friends returning to the Hundred Acre Wood, where their carefree life turns chaotic. It describes their antics, including drinking and misadventures, as they reunite and encounter various challenges. The story showcases the characters' personalities and interactions in a comedic light.
- Novella
The article describes a humorous novella featuring Corporal Johnlan recounting his first military mission and his interactions with a young grandchild over beers.
- Novella
Novella recounts an adventurous escape from a Glot base using a vintage spacecraft, highlighting the protagonist's encounters and clever maneuvers.
- Novella
The article describes a whimsical story about two hedgehogs, Pukhly and Zaraza, who, after a strange event, develop wings and must navigate their new reality. The story blends fantasy and humor as the characters face unexpected changes and challenges. This is a novella showcasing imaginative storytelling.
- News
The article discusses recent updates from Rybninsk related to the FunTop party, detailing contributions from various individuals and teams for the 'Adventurer' magazine and demo competitions.
- News
Статья сообщает о событиях в сообществе Спектрумистов Ярославля, включая информацию о разработчиках программного обеспечения и их текущих проектах.
- Advertisement
The article is a collection of advertisements and announcements related to ZX Spectrum, inviting collaboration from programmers, artists, and musicians, and detailing how to acquire the journal and software.