1st edition of 22-10-1997
last modified on Saturday, October 25, 1997
Your visitor number
Welcome back !
Russia (former USSR) had different but not less interesting speccy life than other countries (such as England, motherland of Speccy). Because of many reasons, such as high cost (for soviets), difficulty in repairs and many many other problems, Russia had to create it's own computer. Soviet people went through various models of home made computers (usually not compatible with each other) when they finally got their BEST (at a time) home machine - spectrum. some people had real spectrums and they had friends - electronic engineers... well, guess what their friends did ? that's right, they created russian analogue of Spectrum. since then, sinclair was the only home computer for everyone (until sometime in late 80s when people found their second speccy - AMiGA ;).
There are too many models of Spectrum in ex-USSR to attempt to list them all here. and we dont need that anyway... all of them are quite similar in main idea, so we wouldnt try to write about them.
Well, despite the fact above, only two models can be called 'most popular'. They are Pentagon and Scorpion. Funny but Scorpion isn't as popular as Pentagon, despite more correct implementation of original Spectrum features, despite Service Monitor, despite good quality, despite everything else... Of course price of Scorpion is .. khe.. bit bigger than Pentagon. anyway, Scorpion is very flexible machine, it can use all sort of external devices ( kempston mouse, iBM keyboard, video-digitizer, midi, Hard Drive, GMX, Professional Monitor, CD-ROm, Zip-Drive, Jazz-Drive, Microwave... whoops, i think i'm typing something wrong here ;). well, end of advertisement (to make it clear, I had Pentagon once, I used it for about 3 years (didnt do any coding then, coz i was lamer, but thatz unrelevant. anyway, it broke about 150 times (give or take dozen of times). Finally i got sick of it, asked my father about buying something more decent and he suggested to buy 'Zs Scorpion 256', new computer by Zonov and Co. Well, we went to radio-market Avtovo, found this firm and got it ! with computer i've got many more friends, including creator of this excellent comp. For all time I had this computer it broke only once - i think it was VG93 (betadisk controller). now you know why I like this computer ;)
Since these computers are most popular in Russia and combining that with creativity of Soviet coders, some software has become hardware dependant. and of course, those programs didnt work properly on other computers. This sort of problems had raised many issues, including stupid ones such as 'my pentagon is better than your **^*& scorpion because...' buglist of pentagon follows. Funny that most of Pentagon owners think that these bugs are features of machine :) for best example wrong INT has been called 'better INT' or wrong number of tacts in one INT (which is of course due to wrong INT) was called 'better, coz now we have more tacts in one frame !!" (hurray, that's really smart, how about I cut couple of wires on my scorpion and make this INT over 300000 tacts and call it "BEST INT", since it got twice as much as pentagon got. enough of that...
Ok, enough of boring history, lets get back to tech info...
I'm describing here only two computers and I already explained you why. if you didnt get it - read again, from start.
To understand how those computers are differ from original Spectrum, let's refer to those diagrams, which show FRAME layout of computers (in tacts and lines).
Total in line : 32 + 36 + 128 + 28 = 224 tacts
Total in frame: 16 lns + 64 lns + 192 lns + 48 lns = 320 lines
from begin of INT: 3584t + 14336t + 43008t + 10752t =
80 lines = 17920 tacts
Signal INT forms wrong, in this computer time from begin of INT till end of frame is 320 lines = 71680 tacts. Therefore, after INT comes, it is useless to output anything on screen in first 16 lines = 3584 tacts, because in this time ray is moving up ( backtracing ).
Total in line : 40 + 24 + 128 + 32 = 224 tacts
Total in frame: 64 lns + 192 lns + 40 lns + 16 lns = 312 lines
from begin of INT: 14336t + 43008t + 8960t + 3584t =
from begin of INT till end of frame 296 lines or 66304 tacts.
Translated&corrected by Random. Original by Anatoly Mokeich and Serge Kuchkin.
Questions and Answers....
JmK> Is it in that order though? I have
read about the 48k (according to the
JmK> documentation of the Z80 emulator) that (I quote):
well, info i gave you was checked by myself. thatz how it works - my scroll on border, AY analyser on border, some multicolor - all of them followed this data. maybe itz different for 48k model ( different ULA or something - btw, on russian models such as Pentagon and Scorpion ULA wasnt used. some weird device was used ( which did the same job basically ).
JmK> This could be wrong, but it suggests
that the screen is not always drawn
JmK> in the order that you'd expect (for the 48K at least).
well, it could be right, it could be wrong - no way i can check it right now. all i can tell for sure is that on pentagon/scorpion it follows FRAME info.
JmK> The Pentagon mode has 320*224 with
INT at line 304.
JmK> The Scorpion mode has 312*224 with INT at line 0 (312).
yeah, but dont forget that 224 in scorp&pentagon are different:
32 (out of screen) + 36 (left border) + 128 (screen) + 28 (right
border) in pentagon and
40 (out of screen) + 24 (left border) + 128 (screen) + 32 (right border) in scorpion 256
JmK> It depends on one thing I read -
that Pentagon and Scorpion have no slow
JmK> (contended) memory. Is this true?
pentagon has no slow memory (as far as i know). neither scorpion i think. wait up - have to test my scorp. yeah, i was right - no slow memory.
also, concerning border emulation...
on original speccy/pentagon/scorpion it is possible to create stripes of different length ( depending on how many tacts between outputs to FE port ). have a look on info above. as little example - if you output #1 in #FE, arrghh, check the code:
OUT (C), H
OUT (C), L
OUT (C), H
OUT (C), L
this code will produce 12 (for pentagon) stripes of two colors (black and blue). each stripe will be exactly 16 tacts (or 32 pixels) long (OUT (C),L takes 12 tacts, NOP - 4 tacts).
The point is - border built of tacts, just as screen.
Betadisk is only spectrum disk interface used in russia. disk interface made by Technology Research Ltd is a part of more than 80% speccies in former USSR. no more tapes... disk only... I hope you understand what does it mean, yes, thats right, everything (well, almost) is converted to TR-DOS. games, utilities, editors - everything. and that's mean that all new releases are TR-DOS only (well, except some eurodemos - some of them have tape versions). To see these new hot releases (sometimes much better than any(!) other games/progs ever released for original speccy. best example UFO series) you will have to get Scorpion/Pentagon or Betadisk interface or EMULATE THE GODDAMN THING ! i prefer first... and third... dont like to mess with connection of hardware ;)
NB!!! As well as tape interface 48k machines gone from Russian market. There're still some old computers left with 48k and tape/disk, but they're not very popular (at all). Where I'm getting is that Pentagon has 128K of Ram and Scorpion 256K (!). So, no more 48k machines, no more tapes, everything fast and advanced (he he). ok, let me continue my story about BetaDisk...
Hmm, actually, story is over, time to give you some tech info. look, HardCore Tech info, extracted, translated and fixed by me from book of A. Larchenko and N. Rodionov - 'ZX Spectrum & TR-Dos for users and programmers'
Disk interface switches on when PC lies within range 15616-15871 ( addresses are different for disk interface by Technology Research, they are 15360-15615 ). then, signal ROM_CS switches the standart ROM off and connects 'shadow' ROM of TR-DOS. Disk interface switches off when PC goes outside of ROM ( 16384+ ). it connects standart ROM back again.
Controller KR1818VG93 ( shortened to VG93 sometimes ) works as the heart of Betadisk ( another name for TR-DOS ) interface. For CPU this controller presented as 4 external devices with addresses #1F, #3F, #5F, #7F ( oo, i wonder what address would fifth one have :) sorry ). But these 4 werent enough and in BetaDisk there's another address #FF. it is 'system register' used to control diskdrives and to control microcontroller. When reading out of system register you usually need only 2 last bits, which show state of microcontroller's signals - DRQ (D6) and INTRQ (D7). DRQ - signal showing request of data by microcontroller INTRQ - signal of completion of execution of command.
D0, D1 - diskdrive select. 00 for drive A, 01 for drive B 10 for drive C, 11 for drive D D2 - hardware microcontroller reset. by resetting and then setting this bit again, we can form impulse of microcontroller reset. usually this reset happenes in very begin of TR-DOS session. D3 - this digit blocks signal HLT of microcontroller. For normal work must contain '1'. D4 - Diskdrive head select. contents of this digit translates directly to diskdrive. 0 means first head or 'bottom' side of disk, 1 - second head/'top' side of disk. D5 - Density select. reset of this digit makes microcontroller works in FM mode, seted digit - MFM.
address name of register access mode 31/#1F command register write 31/#1F state register read 63/#3F track register read/write 95/#5F sector register read/write 127/#7F data register read/write
Command register is needed to programm the controller. commands and their modes are set by certain bits/digits of this register. Command executes as soon as it written in register. Correctness of execution outputs to other register - "state register". Every bit in this register indicates certain parameter relevant for this command/operation.
Registers of Track and Sector are needed to indicate current coordinates of positioning. Track register contains number of physical track where magnetic head is present at this time ( range 0-255, number is limited by physical capacity of drive. side is addressed by special digit in system register ). Sector register indicates number of first physical sector for executing command. usually numeration starts from 0.
Data register is used to exchange data and also for some extra parameters of some commands.
Last three registers (track,sector and data) are 2 way, unlike first two (command and state).
Commands of initialisation
1. Name Initialisation Bits 0 0 0 0 h v x x Purpose Initialisation of VG93, sets head of selected diskdrive into default position ( on 0th track ). Parameters h - bit chooses position of head of diskdrive. 0 - head is up, 1 - is in working conditions - down on disk. NB! when h=0 controller doesnt send signal to start motor. v - in case when h=1 ( head's in working position ) this digit is used to set mode of 'head position checking'. if bit is set then in the end of operation contents of track register is compared with actual number read from disk. xx - these bits control time between signals to move head, in other words, control speed of movement. 00 means 6ms, 01 means 12ms 10 - 20ms 11 - 30ms 2. Name Forced Interrupt Bitz 1 1 0 1 J3 J2 J1 J0 Purpose allows interruption of execution of any command of microcontroller Parameters This command is only command which can be written in command register independent from contents of bit0 of system register. bits J0-J3 sets condition which will cause interrupt. if all bits are reset - current command will be terminated immediately. in this case VG93 doesnt produce signal of confirmation of completion of execution of command. ( he he = ofofofof ;) If any of J0-J3 bitz are set then current command will stop ( and produce this goddamn signal ofofofof ): J0 - after signal CPRDY changes from low to high. J1 - after signal CPRDY changes from high to low. J2 - after coming of index impulse. J3 - immediately. For those commands and for commands of positioning "set to 1" bitz in state register means: 6 - disk is write-protected. 5 - head is in work position. 4 - error of positioning, ie value in track register doesnt match real position of head. 3 - error in control code which occurs when it wasnt possible to read sector. 2 - head is in default position. 1 - index impulse had come. in other words change from 1 to 0 state of this digit indicates that head is in begin of track.
Commands of Positioning:
3. Name Step forward Bitz 0 1 0 i h v x x Purpose command moves head one step forward, ie closer to centre of disk. Parameters i - state of the track register. if i=1 then every step register changes it's value. otherwise register doesnt change. 4. Name Steb back Bitz 0 1 1 i h v x x Purpose command moves head one step back. 5. Name Step Bitz 0 0 1 i h v x x Purpose command moves head one step in direction of previouse command. 6. Name Seek Bitz 0 0 0 1 h v x x Purpose This command performs auto positioning of head on given track. number of needed track have to be stored in data register of microcontroller. 7. Name Read sectors Bitz 1 0 0 m s e c 0 Purpose reads the group of sectors ( or only 1 ) Parameters m - bit give a number of sectors to read. m=0 means one sector will be read, m=1 - all sectors starting with sector give in Sector Register will be read. s - side of disk. 0 - bottom, 1 - up. e - delay. e=0 - no delay. e=1 sets delay between the signal to set the head in working position and start of operation to 15 ms. c - check of side of disk. c=0 - no check 8. Name Write sectors Bitz 1 0 1 m s e c a Purpose writes the group of sectors ( or only 1 ) Parameters a - sets one of possible formats of the sector. Further, when reading, this format will be indicated in bit5 of system register. usually this bit is 0, then in field of header of sector special byte #FB is formed, otherwise - byte #F8. System Register for these two commands ( read/write sectors ) bit meanings are : 5 - sector's read for which bit 'a' was set ( see command 'write sectors' 4 - needed sector not found 3 - error in control code, while reading. this error may occur when reading header field of sector and also when reading data field. 2 - loss of data. 1 in this digit means that some data was lost when transfer of data in/out of register had taken place ( another byte wasnt written or read in/out of register ) 1 - request of data. when set to 1 itz necessary to extract ( or put ) another byte in data register.
Read/Write Commands ( auxiliary ):
9. Name Write Track ( formatting ) Bitz 1 1 1 1 0 e 0 0 Purpose formats the track. information sent to microcontroller must fully correspond to chosen format. 'Writing' starts automatically after the index impulse, ie from begin of track. Unlike 'write sectors' command number of written bytes is not fixed, it determined by certain disk format. some of bytes will be directly written to disk, but some of them will be interpreted in special fashion. they are needed to form special markers, such as address marker or control codes (CC). byte FM MFM #F5 not allowed initialising CC #F6 not allowed writing synchroimpulse C2 #F7 writes 2 byte CC #F8-#FB initialising CC normal bytes #FC writes index mark #FE initialising CC writes address mark of header 10. Name Reading Track Bitz 1 1 1 0 0 e 0 0 Purpose Reads the whole track with all information including space fields, headers and all special bytes. Because of some hardware problems BetaDisk loose synchronisation when executing this command. 11. Name Reading address Bitz 1 1 0 0 0 e 0 0 Purpose reads first encountered sector's header. From sectors field 6 bytes are transferred. 4 bytes are information ( number of track, number of side, number of sector and length of sector ) and 2 bytes of control codes. after this command value of track register has been sent to sector register.
Questions and Answers...
JmK> OK, the paging of the TR-DOS rom,
currently I think that it is paged in
JmK> whenever you do a CALL 0x3DXX, and is paged out after the RET at
JmK> 0x2F8F.Can you confirm/correct this?
yeah, i think so. whenever you called #3d-- ( or even JumPed to #3d-- ) it switches TR-DOS bank in 0-16384 ( i hope ). and whenever you RETurned ( but dont forget that INT 2 interrupts can be enabled - and they should work if addressed properly ) it changes back to normal ( or previous ) state.
JmK> You mean that an interrupt could
come in (which pages out the TRDOS rom
JmK> automatically) and then when you reach the RET at the end of the routine
JmK> this pages the TRDOS rom back in?!
yes, sorta like that. you know that when interrupt comes, computer takes value of I register as high byte, puts #FF as low byte of this new interrupt vector, checks formed address and sends PC to two byte value stored in this address. If I points at 1-16384 then interrupt can be corrupt ( depends. if value is same in both roms ( tr-dos and 48k/128k normal one ) then interrupt will work ok, no problems. so, after interrupt, program by RET returns into TR-DOS. this method was used by various coders. I had pic of animated hour-glass when my game was loading ! very nice effect indeed ;) and music also played. as other good example - Insult megademo used same technique to load parts.
JmK> Right, something I keep on forgetting to ask....
JmK> How can you have Kempston joystick
(0x1F) or port 0xFF if they are both
JmK> used by the TR-DOS system?
TR-DOS ports works if ( AND ONLY IF ! ) TR-DOS is activated. that means when in 0-3fff we have betadisk ROM these ports are activated (and kepston joystick doesnt work). once tr-dos is switched off ( prog went back to 4000+ address ) ports are no longer valid - they have changed for other uses, such as 1F for kempston, FF for attribute.
JmK> I think that autoboot works if a
higher level of TR-DOS rom
JmK> is used?
Yes, Autoboot is activated by pagin in TR-DOS rom and jumping to 0.
JmK> I heard from somebody that there is
a new system in Russia called IS-DOS,
JmK> have you heard of it?
yeah, sure I did. i used to use it a lot, when i was typing my book in ( it (book) was about 200 kb - was really difficult to type in TLW or similar because of non-standart format. Is-Dos is text compatible with Ms-Dos ( and even can read some of MS-Dos disks ). problem is that this system isnt very popular/common - it sits on top of tr-dos, loads a bit slow, never was (never heard of it) build in computer's rom instead of TR-DOS :) alwayz was in combo. by emulating FDI image and/or VG93 registers we can overcome problem of non-standart disks ( which is the case of IS-Dos).
NB!!! Is-Dos uses non-standart format of disks.
In case of Scorpion it launches Service-Monitor, in other TR-DOS versions it saves Snapshot of memory onto disk. if you dont know press of "magic" button will start TR-DOS from address 102 ( 66 hex ).
Questions and Answers...
JmK> In the NMI, the expansion rom must
be paged in, which suggests to me that
JmK> bit 1 of port 1FFD must be set and bit 0 must be reset before the jump to
JmK> 102? Can the monitor jump in and return anywhere, even if port 1FFD has
JmK> ram paged at 0000 and so on?
actually NMI jumps to 102 when TR-DOS rom is paged in. firstly this NMI button was MAGIC button, some sort of snapshot procedure in TR-DOS rom. service monitor cant be called from 48k basic or tr-dos. ( i think itz because PC is in ROM and itz pretty stupid to change roms in such time ). so as general rule, monitor will work ( or at least will try to do so ) when PC is in 4000+ ( hex ), ie in RAM.
JmK> OUT(#FD),A? On a normal Spectrum
this would end up paging memory (like
JmK> in Fairlight 128), on a +3 this would access the FDC. So, a Pentagon is
JmK> (Since the value of A becomes the high byte of the OUT address).
thatz exactly right - Pentagon doesnt need full address access sometimes ( please, dont ask me why and how - i have no idea. something to do with lame ass engineer who designed it :( i'll try to find some more info on this one though. as another hint - this lame addressation was stuffing up Scorpion ( halted the system/didnt do jack ) until i had cut one of MC's on motherboard )
To clarify point stated above, in Pentagon you can address 7FFD (and the rest of WORD registers) by not-full addressation. this trick does not work on Scorpion much (not if they (goddamn coders) use OUT (FD), A and don't check value of A (would be great if they used A as high byte, but since 'we need all memory we have' bull, these guys are pain in the head ;). As other example of such not-full-much addressation is a case with registers (or ports if you like to call them like that) if AY-8910(2) or other music chip used in 128k model of original speccy (btw, chip by YAMAHA used for same purpose in some of machines). Anyhow, some samples didnt work (or still doesnt work) on machines with full addressation - when you output random (he he) sh.. stuff using this construction: OUT (FD),A on machines with full addressation it would make all sort of cool effects, starting with paging memory in/out and finishing with formatting of Hard Drive of your best friend (did I say that ? well, that's not that bad). Anyway, it will do everything except working properly (of course if random number is BF then it would be allright, but it's not very random is it ? (I know everything about random stuff and chaos theory). well, i suppose you already bored of my stuff, so let me continue... Somehow, on Pentagon it will work. I suppose they have blocking of last used register or something like that. dont ask me much, I dont even have this pentagon anymore, if you need more information, ask me and I'll try to update this section with more info (but you still can use idea of not-full addressation, using theory of blocking last-used register).
first of all it is 256kb model, not just 128kb. ok, tech info on scorpion (I/O as you like :)
*port 7ffd. full compatibility with Zx spectrum 128. digits are: D0-D2 - number of RAM page to put in C000-FFFF D3 - switch of address for RAM of screen. 0 - 4000, 1 - c000 D4 - switch of ROM : 0-zx128, 1-zx48 D5 - 1 in this bit will block further output in port 7FFD, until reset. *port 1ffd - additional port for resources of computer. D0 - block of ROM in 0-3fff. when set to 1 - allows read/write page 0 of RAM D1 - selects ROM expansion. this rom contains main part of service monitor. D2 - not used D3 - used for output in RS-232C D4 - extended RAM. set to 1 - connects RAM page with number 8-15 in C000-FFFF. number of page is given in gidits D0-D2 of port 7FFD D5 - signal of strobe for interface centronics. to form the strobe has to be set to 1. D6-D7 - not used. ( yet ? )
with reset all digits of this port are dropped to 0.
these two ports ( 7ffd and 1ffd ) cannot be accessed thru basic. basic operator OUT will hang or reset the machine. only one exception - bits d2 and d5 of 1ffd. rest of digits of these ports must be accessed using machine code.
*port FF - port of current screen attributes.
NB!!! should be implemented in other models as well. !!!! important !!!!
when reading from port FF it gives value of attribute which is currently been displayed on screen. if on time of READing computer ouputs border then this port gives FF. for more information conact me again.
*port FE - keyboard D0-D4 - input from keyboard D5 - used for input thru RS-232C D6 - input from taperecorder. D7 - used to analyse signal "BUSY" of interface Centronics *port FFDD - port of data of printer ( centronics )
ouput code of symbol to print in this port. it is possible to use this port for other purposes such as non-standart extension of keyboard, to control different external devices, etc.
*ay ports. no comments. fully compatible with zx spectrum 128 *ports of TR-DOS. were described before. dont forget that D3 in port FF (tr dos) must be set to 1 to work properly.
Computer Scorpion ZS 256 has 64Kb of ROM and 256Kb of RAM, divided in pages, 16K each. One of 4 ROM pages is placed in 0-3fff. Rom pages are: zx128 ( rom0 ), zx48 ( rom1 ), Expansion ( rom2 ), TR DOS ( rom3 - please note that Scorpion using modified version of TR-DOS. it is not possible to use other versions/ROMS). Page Expansion is used for Service-Monitor. RAM of computer is divided in 16 pages. Pages with numbers 0..7 work absolutely as in zx128 - page 5 always placed in 4000-7fff, page 2 - in 8000-bfff and area c000-ffff can be used by any pages with numbers 0-7, depending on digits D0-D2 of port 7ffd. other 8 RAM pages with numbers 8..15 can be connected in C000-FFFF when bit D4 of port 1FFD is set to one. for example page 6 was connected to c000-ffff, after setting D4 in 1FFD page 14 ( 6+8 ) was connected in area c000-ffff.
It's also possible to switch off ROM and connect RAM page 0 instead. to do that digit d0 of port 1ffd must be set to 1. dont forget about interrupts while doing that.
Memory Allocation Table:
address page banks which can be switched in that position ffff\ / ram0, ram1, ram2, ram3, ram4, ram5 (screen0), }--PAGE 3-- ram6, ram7 (basic128), ram8 (monitor), ram9 (monitor), c000/ \ ramA, ramB, ramC, ramD, ramE, ramF bfff\ / ram2 }--PAGE 2- 8000/ 7fff\ / ram5 }--PAGE 1- 4000/ 3fff\ / rom0 (basic48), rom1 (basic128), rom2 (monitor), }--PAGE 0-- rom3 (TR-DOS), ram8 (monitor) 0000/
BTW, dont forget to make NMI button. Read about it in NMI section.
NB!!! you cannot launch Shadow Monitor from ROM or whatever placed in memory 0-3fff. NMI just doesnt exist when PC is in this area. please consider that and change something ;) Other thing - my careful observation of lights on my computer has shown that computer switches to FAST mode for split of second and then goes back to NORMAL (or if it started in FAST mode it doesnt do jack). I have very small amount of info on this question though. first of all - there's button (next to magic and reset) which allows you to change speed. default is HIGH or FAST. (i remember connecting this button myself :) as well as LED light ;) anyway, there's also system procedure which allows to change speed of computer. programmer can change speed of computer by executing following constructure :
RST 8 - which is scorpion's system call. this RST allows access to scorpion resources including shadow monitor, printer and all rest ( now it supports HDD, CMOS, something else. not with this version of ROM of course ) #87 - for TURBO/FAST mode or #88 - for NORMAL mode. If board doesnt support change in speed these procedures set CY to 1.
for example to change speed to FAST i have to write #CF, #87. i have strange feeling that somewhere inside there's another port which allows to change speed. or it could be some extra bit of 1ffd, which unlikely.
Questions and Answers...
JmK> Can port 1FFD be read?
checking... using most advanced assembler for Spectrum - XAS (if you want copy of it - get it off my pages. links below...
No, it seem to return FF all a time. despite me changing RAM bank :) ( thatz why i like service monitor - if you implement this scorpion feature, we dont need Debugger :) wait a bit, i'll try to OUT and IN combo. yeah, same result - FF forever :)
JmK> How is the expansion rom paged in/out?
expansion rom paged in/out using port 1ffd - bit D1. when D1 is set to 1 - rom2 paged in. once it dropped back to zero - rom2 paged out.
JmK> Is there anything which will not run with only 128k?
yep. service monitor wont work ( very usuful thing ). Is-Dos, some other system progs need more than 128 to work faster ( like copiers and assemblers and gfx editors, and music editors and etc )
Btw, there are some models with 512 and even 1024. And I'm not talking about Sprinter yet (This computer goin' to be extreme).
Shadow monitor is an essential part of Scorpion now (first models were without it though). It is very good and very usuful utility built in Scorpion's ROM. It has many purposes, such as Save&Load programs in real time, Monitor (! probably the best debugger/disassembler), Print utility and Disk Utilities. It also allows you to change speed of Scorpion (from Fast to normal and vice versa). Here's some tech info about this prog:
Monitor takes whole ROM bank 2 (expansion), part of ROM 3 (tr dos) and couple of addresses from 0 and 1 banks. For itz work service-monitor uses 8 and 9 banks of RAM and also 11 bytes from stack. Register SP in monitor shows real position of stack in interrupted program, but 11 bytes in stack below SP will be lost.
Also monitor uses 8 bytes of workbuffer, which can be placed in various position ( command WORKSPACE in monitor ). default is 23719..23726
Please consider that following conditions will disrupt proper work of interrupted program: 1. if SP points at ROM 2. if in program SP used for addressing the data 3. absence of hardware tracking of system registers changes doesnt give 100% guarantee of correct identification of computer configuration on time of NMI. for example if program doesnt use copy of register 7FFD in system variable BANKM (23388) number of active screen will be detected wrongly.
All of above also works same for standart MAGIC button from TR-DOS rom. but shadow monitor in some cases can be more demanding.
Information stored on stack: shift relative bytes description to stack -2 2 value of PC - address of return from non-masked interrupt. formed by hardware. -4 2 value of AF, this and next values are written by program serving the monitor call, which is placed in banks 0 and 1 of ROM. -6 1 value of R -7 1 state of flag IFF2 - stored in second bit -8 1 number of function. used by monitor for selecting type of call -9 2 value of register BC -11 2 system information, used to localise number RAM bank used.
Questions and Answers...
JmK> Does the monitor preserve the value
of R-reg exactly? I ask this since I
JmK> have been wondering if the act of a NMI increases the R-reg.
Well, according to info above it does saves the R value.
This device become very popular in Russia, almost all new progs with GUI (gfx user interface) can be controlled with this mice. Not hard to implement at all...
#FADF - buttons. d0-right, d1-left, d2-middle. when not pressed - set to 1. drops to zero when button is pressed. #FBDF - port of x-coord #FFDF - port of y-coord
values in ports change cyclically ( this weird word means that when value goes over FF or 0 it comes from other side. for example FD FE FF 0 1 etc... or 4 3 2 1 0 FF FE...
Questions and Answers...
JmK> Oh oh! 3 button!
yeah, high technology :)))
JmK> Do these ports return the physical
x-y value, or do they just return the
JmK> difference since the last read? And do any interrupts get generated by
interrupts are not generated, you have to manually check the ports for values. and ports return physical values, not just difference.
well, that is a self-explained point ;). New demos use double buffering/high color and high res effects. If your screen swapping isnt synchronised it will produce flicker. what else can i say ? maybe use of VGA back retrace will help. (in progs which switching screen very often you can notice this flicker/screen update. happened to some of my iBM progs as well - but i used back retrace ;)
Questions and Answers...
JmK> The demos which use the page
flipping trick usually look flickery on a
JmK> real TV as well (but in a different way).
guess what ? it's almost not noticable. i've checked most of demos, which synchronised thru INT and/or/not/xor port FF - almost 2 bitplanes without problems.
Would be nice if user could change them ( Custom mode ) and also have Interrupt offset (remember how Pentagon's INT offset different to Scorpion's ? - well there are different models, with different offsets...). interrupt offset should be variable (to align some high res effects timed for different machine.
Since different models of spectrums have different AY output switch ABC/ACB is needed. to explain it a bit - on many spectrums i've seen AY output made as STEREO output. channel A - left, channel B - right, channel C - centre. that means when you listen to it, channel C sounds twice as loud - it comes from both speakers. to emulate such feature all you need is to output Centre channel ( B or C for different models ) twice as loud. I hope I dont have to tell you to make it as option ABC/ACB/MONO (ABC - a=c, b twice as loud, ACB - a=b, c twice as loud and MONO - a=b=c)
Also dont forget to make your WHITE NOISE and ENVELOPE emulation proper. No pseudo random generated noise is allowed. if you want to know why, listen to music in some new demos or 'music on interrupt' from E96 on real spectrum and compare to your (or not your yet) emulator. listen to this 'beat' effects... got it ?
1 - not ready ( disk is absent or doesnt spin ( he he ) 2 - Write protect 3 - BREAK was pressed 4 - error when read or write sector/s 5 - error in positioning ( number of track doesnt match ) 6 - error in positioning ( couldnt read address marker of track ) 8 - error in positioning ( type mismatch. when you trying to use 80 track disk on 40 track diskdrive or double sided disk on singlesided diskdrive, etc 9 - disk's not formatted 16- disk doesnt match TR-DOS format by physical parameters : size of sector, density, or no identification code. 17- code of TR-DOS disk type doesnt match real format 18- work buffer isnt open 20- errors had place in read/write track procedures.
Some problems with disked programs can be caused by TR-DOS rom, if you use TR-DOS 5.05 which is bit different from prev versions it can raise some compatibility problems (with programs which use non-standart procedures inside of Rom, since they had changed address)
Actually only 5.03 is version by Technology Research, rest of them just *advanced* versions by some hackers. better use 5.03 - more convinient and there's no programs which need higher version anyway.
You may want to download roms of those Russian spectrums. Well, now you can, just go to Cha0s files and get them in Misc section. There you will find various TR-DOS roms, some different 128k spectrum roms, couple of 48k ones, Scorpion's ROMs...etc
To test your (not necessary) emulation you can get files from Speccy Zone. There's quite big download section there.
Some stuff can be found on official Concern Chaos site. It has spectrum section with downloads as well.
To see person who made this FAQ you can go to Concern Chaos member profiles page and look up Random Chaos. that would be me.
Well, that's about it, if you have any questions, just mail me ([email protected]).
(c)1997 Concern Chaos. Any reproduction of this FAQ has to be approved by the official maintainer. There's no charges for including this FAQ anywhere as long as it stays unmodified - we just need a notice from you. If you will copy parts of this FAQ to include anywhere in any media without our permession you will be punished. Please receive our permission FIRST. thank you.