(C) Ivan Roshchin, Moscow, 1998
ART STUDIO and the principle of open architecture
There is a version of the graphic editor ART STUDIO (v2.01c, corrected by ROM/SM and FUX/SM) that can play music while working. That is, on the disk, the editor itself is recorded, and immediately after it - the file "artmusic", containing compiled music in PRO TRACKER or SOUND TRACKER PRO format. When the editor is launched, this file is loaded into a free RAM bank (1 or 6), and during the work, the player is called by interrupts. (It turned out that the name of this file does not matter, as long as it is recorded directly after the editor, i.e. the file "ART".) I previously used other versions of ART STUDIO, which had their drawbacks: sometimes the arrow would disappear for no reason, sometimes colored stripes would appear on the screen, and everything would freeze... So when the new version came out, I switched to it. But even here I was faced with unpleasant features (generally known to all ART STUDIO users) - the inclusion of a white border in the Magnify, Font editor, and Scrapbook modes. Something had to be done about this, and I decided to slightly modify the player in the music file. The editor set the white border, while the player called by interrupts, in addition to its main task, set the color I needed.
I worked with this version of ART STUDIO for quite a while until another problem arose: I needed to draw a certain image at known coordinates of its points. How, for example, to mark a point on the drawing with coordinates X=45, Y=83? If only the current coordinates of the cursor were constantly displayed on the screen...
And then I thought: what if I write a module with the same starting address (#C000), the same entry points (INIT = #C000, PLAY = #C006) as the compiled music, and then "slip" it to the editor, recording it instead of the "artmusic" file. And this module, in turn, would display the cursor coordinates on the screen every time it is accessed.
The module (known as art_xy) was written and successfully displayed the coordinates (and besides that, it monitored the border and set the necessary initial attribute values). At the end of this article, the source code of its main part is provided, which will be useful for you when developing your own modules.
So what do we see? It turns out that any missing feature in ART STUDIO can be easily implemented by writing a special module for it. And if several modules are written, they can be loaded in sequence without leaving the editor (for this, of course, each module must have a command to load another module and transfer control to it).
╔════════════════╗ ╔════════════════╗
─╢ RAM ╟─ ║ ▒▒▒▒▒▒ DISK ═ ║
─╢┌──────────────┐╟─ ║ ▒▒▒▒▒▒ ══════ ╔╝
─╢│ │╟─ ║ ┌────────┐ ╚╗
─╢│ ART STUDIO │╟─ ║ │module 1│ ║
─╢│ │╟─ ║ └────────┘ ║
─╢│ ┌──────────┐ │╟─ ║ ... ║
─╢│ │┌────────┐│ │╟─ ║ ┌────────┐ ║
─╢│ ││module 1││ │╟─ ║ │module n│ ║
─╢└─┘└────────┘└─┘╟─ ║ └────────┘ ║
╚════════════════╝ ╚════════════════╝
Creating your own module is undoubtedly much easier than writing a new graphic editor "from scratch". Various modules can be written by different people, independently of each other. And this is the principle of OPEN ARCHITECTURE. Surely James Hutchby, the author of ART STUDIO, did not anticipate such possibilities for his editor.
What functions can be contained in an additional module? For example, quick viewing of pictures recorded on the disk without loading them into the editor, saving and restoring configuration, using additional memory (>128K) as a RAM disk, performing various transformations on the selected window, and of course, music and screen saver. All of this can easily fit into 16 kilobytes.
In "ZX-FORMAT #7" you can read about the "STATE OF THE ART" project by the group "AVALON". As it is written there, this is a new graphic editor with extraordinary capabilities, combining the advantages of the best editors on SPECTRUM, PC, and AMIGA. It would be nice if the modular construction principle was used there as well, with detailed descriptions of the interface between the module and the editor, so that each user could implement the function they need. This provides virtually unlimited expansion of the editor's capabilities.
──────────────
Now I will tell you in more detail how to write your own module for ART STUDIO. I will start with the addresses I know where the editor's variables are located:
INK - 52186 (0-7, 8-transp.)
PAPER - 52187 (0-7, 8-transp.)
BORDER - 52188 (0-7)
BRIGHT - 52189 (0-off, 1-on, 2-transp.)
FLASH - 52190 (0-off, 1-on, 2-transp.)
The absolute coordinates of the cursor (X - 56035, Y - 56036) are duplicated at addresses 64977 and 64978 respectively. The origin is located in the upper left corner of the screen.
Since these variables are in bank 0 of memory, and the module is loaded into bank 1 or 6, access to them is carried out using special functions - see the listing.
During the first 50 accesses to the module (i.e. 1 second of real time after launching the editor), the editor is unpacked and the variables are initialized. If the module provides for changing the default attributes (INK, PAPER, BORDER) to others - these attributes need to be set again on each of the first 50 accesses. The explanation here is that, obviously, when the editor starts, commands of the following kind are executed:
LD A,0
LD (52186),A ;INK
LD A,7
LD (52187),A ;PAPER
LD A,7
LD (52188),A ;BORDER
... ;an interrupt occurs, calls ;the module that sets the
;necessary INK, PAPER, BORDER
CALL CLS ;clear the screen
;according to the attributes
It is clear that the setting of the necessary attributes should occur after the editor sets their values, but before the editor performs the screen clearing. And since it is unknown which interrupt will correspond to this moment, it is necessary to set the attributes 50 times.
By the way, if you need to change the default attribute values to "transparent" when launching the editor, it is better to do this after the first 50 module calls - otherwise, during the screen clearing, the attributes will be set randomly.
Source code
main part of the module "art_xy"
─────────────────────────────
ORG #C000
JP INIT ;#C000 - INIT
DS 3
JP PLAY ;#C006 - PLAY
RET ;#C009 - STOP
;Values of INK,PAPER,BORDER:
COLORS DB 7,0,0
;--------------------------------------;Procedure INIT - executed before
;the editor starts working.
INIT DI
;Save memory for resident:
CALL SAVE_M
;Move resident N3 and launch it.
;In the BANK cell, we get the bank number,
;where art_xy is loaded:
LD HL,RES3_B
CALL LOAD_R
CALL #6000
;Restore the previously saved
;memory area for the resident:
CALL LOAD_M
;Display the message "module loaded... "
;and wait for a key press:
CALL #D000
INIT1 XOR A
IN A,(254)
CPL
AND 31
JR Z,INIT1
EI
RET
;--------------------------------------;Procedure PLAY - executed every
;1/50 second.
PLAY DI
CALL SAVE_M
...
CALL LOAD_M
EI
RET
;--------------------------------------;Procedure LOAD_M saves in the buffer
;the memory area for the resident
;(starting address - #6000, length of the area ;length of the longest resident, in
;this module it is resident N3).
LOAD_M LD HL,RES_BUF
LOAD_R LD DE,#6000
LD BC,RES3_E-RES3_B
LDIR
RET
;--------------------------------------;Procedure SAVE_M restores the previously
;remembered (using LOAD_M) area
;of memory.
SAVE_M LD HL,#6000
LD DE,RES_BUF
LD BC,RES3_E-RES3_B
LDIR
RET
;--------------------------------------;Procedure GET_MEM - analogous to the command
;LD A,(DE). Needed for access to bank 0
;of memory.
GET_MEM PUSH HL
PUSH BC
PUSH DE
LD HL,RES1_B
CALL LOAD_R
POP DE
CALL #6000
POP BC
POP HL
RET
;--------------------------------------;Procedure TO_MEM - analogous to the command
;LD (DE),A. Needed for access to bank 0
;of memory.
TO_MEM PUSH HL
PUSH BC
PUSH DE
LD HL,RES2_B
CALL LOAD_R
POP DE
CALL #6000
POP BC
POP HL
RET
;--------------------------------------;Resident N1 - LD A,(DE):
RES1_B LD BC,#7FFD
LD HL,(BANK)
OUT (C),H
LD A,(DE)
OUT (C),L
RET
RES1_E
;--------------------------------------;Resident N2 - LD (DE),A:
RES2_B LD BC,#7FFD
LD HL,(BANK)
OUT (C),H
LD (DE),A
OUT (C),L
RET
RES2_E
;-------------------------------------;Resident N3 determines which bank
;(1 or 6) the module art_xy is loaded into.
;It remembers this value in the variable
;BANK.
RES3_B LD BC,#7FFD
LD A,#11
OUT (C),A
LD A,(PRIZN)
CP "+"
LD A,#11
JR Z,RES3_1
LD A,#16
RES3_1 OUT (C),A
LD (BANK),A
RET
RES3_E
;--------------------------------------;Buffer for remembering the memory area
;for the resident:
RES_BUF DS RES3_E-RES3_B
PRIZN DB "+"
BANK DW #1000
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.