computers.
ZXNet echo conference «code.zx»
From Aleksandr Majorov → To Alexandr Kolotuhin 4 July 2000
Hello Alexandr!
01 Jul 00 16:25, Alexandr Kolotukhin -> All:
[skipped]
AK> 1. How to identify different types of computers from ACM:
AK> Scorp, Kai, Proffi, ATM and others who have a memory of 256 and
AK> above.
AK> 2. Which of the above computers, through which ports
AK> pages are switched.
This is an old, old creation by Creator (sort of).
It even seems to work :)
=== begin of file AUTOconf.txt ===
;IY+#00 MACHINE TYPE
;IY+#01 ALL PAGES
; 0 =1 #7FFD SPECTRUM 128K
; 1 =1 #1FFD KAY
; 2 =1 #DFFD PROFI
; 3 =1 TURBO 2+
; 4 =1 #FDFD ATM TURBO 1
; 5 =1 6 & 7 bit #7FFD
; 7 =1 #1FFD SCORPION
;---------------------------------------;
RAM_TST DI
LD IY,MAC_TYP
XOR A
LD (IY+#00),A
LD A,(#0008)
CP#C3
JR NZ,ITURBO
SET 7,(IY+#00)
JR I7FFD
;-----------------------------------;
ITURBO LD HL,(1111)
LD BC,#FFF7
LD A,#1F
CALL OUTC_A
LD DE,(#C000+1111)
AND A
SBC HL,DE
LD A,#FF
CALL OUTC_A
JR NZ,IDFFD
SET 3,(IY+#00)
JR I7FFD
;---------------------------------;
IDFFD LD HL,#0080
LD DE,#1000
LD BC,#DFFD OUT (C),D
LD A,(HL)
INC (HL)
CP (HL)
LD (HL),A
OUT (C),E
JR Z,I1FFD
SET 2,(IY+#00)
JR I7FFD
;-------------------------------;
I1FFD LD DE,#1100
LD B,#1F
OUT (C),D
LD A,(HL)
INC (HL)
CP (HL)
LD (HL),A
OUT (C),E
JR Z,IFDFD
SET 1,(IY+#00)
JR I7FFD
;-------------------------------;
IFDFD LD E,#10
LD B,C
LD HL,#FFFF
OUT (C),D
LD B,#7F
OUT (C),D
LD (HL),D
LD B,C
OUT (C),E
LD B,#7F
OUT (C),D
LD (HL),E
LD B,C
OUT (C),D
LD B,#7F
OUT (C),D
LD A,(HL)
CP D
JR NZ,I7FFD
SET 4,(IY+#00)
;-------------------------------;
I7FFD LD HL,#0080
LD DE,#1000
LD BC,#7FFD
OUT (C),D
LD A,(HL)
OUT (C),E
CP (HL)
OUT (C),D
JR Z,SIZED
SET 0,(IY+#00)
;-------------------------------;
SIZED LD HL,TABL_P1
LD A,#FF
SIZED1 LD (HL),A
INC HL
INC A
CP #02
JR NZ,$+#03
INC A
CP #05
JR NZ,$+#03
INC A
CP #08
JR NZ,SIZED2
BIT 7,(IY+#00)
JR Z,SIZED2
INC A
SIZED2 CP #80
JR NZ,SIZED1
LD (HL),#FF
CALL VIRT
XOR A
CALL EX_RAM
LD IY,#0000
EI
RET
;-------------------------------;
VIRT LD IX,#DB00
LD HL,TABL_P2+127
LD B,128
V_R11 LD A,B
DEC A
CALL EX_RAM
LD C,(IX+0)
LD (HL),C
LD (IX+0),A
DEC HL
DJNZ V_R11
;-------------------------------;
LD (IY+#01),125
BIT 7,(IY+#00)
JR NZ,$+#05
INC (IY+#01)
LD DE,TABL_P1+#01
V_R20 LD A,(DE)
INC DE
CP #FF
JR Z,V_R30
CALL EX_RAM
CP (IX+0)
JR Z,V_R20
DEC DE
PUSH DE
LD HL,TABL_P1+127
AND A
SBC HL,DE
LD B,H
LD C,L
LD H,D
LD L,E
INC HL
LDIR
DEC (IY+#01)
POP DE
JR V_R20
;---------------------------------------;
V_R30 LD B,128
LD HL,TABL_P2
V_R31 LD A,128
SUB B
CALL EX_RAM
LD A,(HL)
LD (IX+#00),A
INC HL
DJNZ V_R31
RET
;-------------------------------;
ON_PAGE PUSH HL,BC
LD C,A
LD B,#00
LD HL,TABL_P1+#01
ADD HL,BC
LD A,(HL)
POP BC,HL
CALL EX_RAM
EI
RET
;-----------------------;
EX_RAM DI
PUSH HL,BC,AF,AF
LD A,(MAC_TYP)
BIT 1,A
JR NZ,ZS256
BIT 7,A
JR NZ,ZS256
BIT 2,A
JR NZ,PROFI
BIT 3,A
JR NZ,TURBO_2
BIT 4,A
JR NZ,ATM1
;-------------------------------;
SPEC128 POP AF
LD B,A ;IN: A=%000rrrrr
AND %00000111
LD C,A
LD A,B
AND %00011000
RLCA
RLCA
RLCA
OR %00010000
OR C
LD BC,#7FFD
OUT (C),A
POP AF,BC,HL
RET
;-------------------------------;
TURBO_2 POP AF
PUSH AF
LD BC,#FFF7
AND %00111000
CPL
CALL OUTC_A
JR SPEC128
;-------------------------------;
ATM1 POP AF
PUSH AF
LD BC,#FDFD
AND %00011000
RRCA
RRCA
RRCA
ATM10 OUT (C),A
JR SPEC128
;-------------------------------;
PROFI POP AF
PUSH AF ;IN: A=%00zzzxxx
LD BC,#DFFD
AND %00111000
RRCA
RRCA
RRCA
JR ATM10
;-------------------------------;
ZS256 POP AF
LD B,A ;IN: A=%0zzzyxxx
AND %00001000
RLCA
LD C,A
LD A,B
AND %00110000
RLCA
RLCA
OR C
PUSH BC
LD BC,#1FFD
OUT (C),A
POP BC
LD A,B
AND %00000111
LD C,A
LD A,B
AND %01110000
RRCA
OR C
JR PROFI+#01
;-------------------------------;
OUTC_A PUSH HL
LD HL,#2A53
EX (SP),HL
JP #3D2F
;-------------------------------;
Aleksand
From Felix Knajzev → To Alexandr Kolotuhin 5 July 2000
Greetings, O venerable Alexandr!
[Saturday July 1, 2000] at [16:25:31] Alexandr Kolotukhin wrote a letter to All.
They discussed the topic "computers." Let's continue what we started...
AK> Tell me, please:
AK> 1. How to identify different types of computers from ACM:
AK> Scorp, Kai, Proffi, ATM and others who have memory
AK> 256 and
AK> above.
[skip]
============== here we will start the file "OnLine76.C" ================
(C) PAUL FALCON
I would like to introduce you to a program that will help you
rummage" with the top memory. That is, control it on different machines
nah.
When launched, the program itself determines which computer it is connected to.
works. And sets the variables in accordance with the testing
machine knowledge: what kind of computer, and how many “brains” it has, i.e. pa-
wrinkle.
To work with the program, it is enough to refer to three procedures:
frames regardless of the type of specific computer.
The main system 55-65% was coded by my friend Yura Kovalevsky. pe-
reworked, added more machines to identify, coded 45-35% - me.
Well, now the technical information, in fact, what and how:
Data for a specific machine is in the variable (IY+118)
(23728) and its bit layout is as follows:
0 =1 there is port #7FFD SPECTRUM 128K
1 =1 there is port #1FFD SCORPION or KAY2 =1 there is a port #DFFD PROFI
3 =1 there is a port #FFF7 TURBO 2+
4 =1 there is port #FDFD ATM TURBO
5 =1 6 and 7 bits are valid #7FFD
6
7 =1 at address 8 bytes #C3 (SCORPION)
Matches by meaning, i.e. what significance will it have
belt (IY+118) when identifying a particular computer:
0 SPECTRUM 48K
1 SPECTRUM 128K
32+1 SPECTRUM 256K - 512K
2 KAY 48K
2+1 KAY 256K - 1024k
4 PROFI 48K
4+1 PROFI 256K - 1024K
8 TURBO 2+ 48K
8+1 TURBO 2+ 128K - 1024K
16 ATM TURBO 48K
16+1 ATM TURBO 128K - 512K
128 SCORPION 48K
128+1 SCORPION 128K
128+2 SCORPION 256K - 1024K
The number of actually existing pages is entered into the variable
new (IY+119)(23729).
Naturally, you can use other addresses for storing these
variables, but these are the most convenient in my opinion.
Managing the program is so simple that you need to know everything
three procedures:
If, when defining any machine, it is necessary to exclude non-
how many pages, then the DEBUG procedure will help here, in the C register
indicates the number of the page to be deleted from the table. Do it on-
before immediately after machine definition and after memory definition
(after CALL VIRT).
Example: ....
LD C,8
CALL DEBUG
....
In this example, page number 8 will be removed from the available onesfor switching (useful for Scorp, it does not kill the shadow).
If this procedure is not useful to you, then you can safely cut out
load it from the program from the DEBUG to ONPAGE labels.
Also, the number of pages and their numbers can be adjusted
right in the table itself (at the end of the program) initially there is no
There are 2 and 5 pages.
Turning pages by their logical number is a procedure
ONPAGE.
Example: ....
LD A,8
CALL ONPAGE
....
This example will include with #C000 the page located at number
ru (in reg. A) from the beginning of the table (in our case it will be included
Page 10, if there is one here at all).
Turning pages by their physical number is a procedure
EX_RAM.
Example: ....
LD A,8
CALL EX_RAM
....
From #C000 the page with the number (in reg. A) will turn on. Those. really
8 page.
Here's the program itself...
; @ @ @ @@@ @@@
; @ @ @ @ @ @ @
; @ @ @ @ @ @ @ @@ @ @ @ @@ @ @@@
; @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
; @ @ @ @ @ @ @ @ @ @ @ @ @@ @@ @ @ @@
; @@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
; @ @ @@@ @ @@@ @@ @ @ @ @ @ @@@@
;
; VERSION 5.5. IMPROVED.
;
;
; AUTOCONFIG PAGEMAKER FOR MACHINES:
;
; TURBO 2+ (48K - 1024K) V6.00 - V7.1
; ATM TURBO (48K - 512K) V4.10 - V5.20
; SCORPION (48K - 1024K)
; PROFI (48K - 1024K); SPECTRUM (128K - 512K) 6 & 7 BIT #7FFD
;
; THE SHAREWARE PRODUCT FOR FREE USING!
; (when using this procedure in
; their programs link to the authors
; almost mandatory (but up to you))
START ; start started...
XOR A
LD (IY+118),A ; computer type
INC A
LD (IY+119),A ; number of available pages
D.I.
; check (.) 'RST 8' in ROM 48 (if ZS-256, there is #C3)
LD BC,#7FFD
LD A,#10
OUT(C),A
LD A,(#0008)
CP#C3
JR NZ,ITURBO ; not ZS-256
; this is probably SCORPION
SET 7,(IY+118)
ITURBO
; checking the presence of a RAM/ROM manager
; take 2 bytes from the 0th segment (ROM48 there)
LD HL,(1111)
; duplicate ROM48 in the 3rd segment (#C000-#FFFF)
LD BC,#FFF7
LD A,%00011111
CALL OUTC_A
; take 2 bytes of the 3rd segment (if TURBO 2+, there is ROM48)
LD DE,(#C000+1111)
AND A
SBC HL,DE ; compare with bytes of the 0th segment
; restoring the dispatcher
LD BC,#FFF7
LD A,#FF
CALL OUTC_A
JR NZ,IDFFD ; this is not TURBO 2+
; RAM/ROM manager detected (TURBO 2+)
SET 3,(IY+118)
JR I7FFD
; PROFI?
IDFFD LD HL,#80
LD DE,#1000
LD BC,#DFFD; check for port #DFFD bit 4
; (check the RAM connection instead of ROM)
OUT (C),D ; enable the 0th RAM segment
; instead of ROM
; try to disable ROM
NOP
LD A,(HL) ; read byte
INC(HL); change it
CP(HL); compare with what we read
LD(HL),A ; restore the byte
OUT (C),E ; restoring ROM
JR Z,I1FFD ; no #DFFD port
; there is a port #DFFD (PROFI)
SET 2,(IY+118)
JR I7FFD
; check for port #1FFD bit 0
; (check for RAM connection instead of ROM)
I1FFD LD DE,#1110
LD B,#1F
OUT (C),D ; enable RAM segment 8
NOP
LD A,(HL) ; read byte
INC(HL); change it
CP(HL); compare with what we read
LD(HL),A ; restore the byte
OUT (C),E ; put the ROM in place
JR Z, IDFFD ; no port #1FFD
; there is port #1FFD (SCORPION or KAY)
XOR A
OUT(C),A
SET 1,(IY+118)
JP I7FFD
IFDFD
; Checking for the presence of port #FDFD (ATM-1)
LD B,C
LD HL,#FFFF
OUT(C),D
NOP
LD B,#7F
OUT(C),D
NOP
LD(HL),DLD B,C
OUT(C),E
NOP
LD B,#7F
OUT(C),D
NOP
LD(HL),E
LD B,C
OUT(C),D
NOP
LD B,#7F
OUT(C),D
NOP
LD A,(HL)
CP D
JR NZ,I7FFD ; there is no such word
; however there is a #FDFD port
SET 4,(IY+118)
; presence of port (#7FFD)
; (check for switching ROM48<->ROM128)
I7FFD LD HL,#80
LD DE,#1000
LD BC,#7FFD
OUT (C),D ; ROM 1, definitely!
NOP
LD A,(HL) ; byte ROM 48
OUT (C),E ; ROM 0
NOP
CP(HL); byte from ROM 128
OUT (C),D ; ROM 1
NOP
JR Z,SIZED ; no port or blocked
; port #7FFD detected
SET 0,(IY+118)
; determine the amount of memory
SIZED
CALL VIRT ; DE - end of table (label #FF)
LD A,(IY+119) ; SPECTRUN 256K-512K ?
CP#08
JR C,ENDING
LD A,(IY+118)
CP#01
JR NZ,ENDING
SET 5,(IY+118) ; cool SPECCY 256K - 512K
ENDING
LD A,#00 ; page after exiting the program
CALL EX_RAM ; in port #7FFD on SPECTRUM 128K.
EI; for normal exit.
RET; determination of real (!) pages for a given machine
; "phantom" pages will be removed from the logical table
; at the output:
; DE - end of table (label #FF)
; variable PAGE - available number of pages
VIRT LD IX,#C000
; fill the pages with their numbers, saving the contents bytes
; at check points (#C000)
LD HL,DOOM+63
LD B,64
V_R11 LD A,B
DEC A ; NN page 63,62,61,60...1.0
CALL EX_RAM
LD C,(IX+0)
LD(HL),C ; save byte contents
LD (IX+0),A ; put the page number there
DEC HL
DJNZ V_R11
; exclude not found pages from the table
PUSH AF
LD A,61
LD (IY+119),A
POP AF
LD DE,TABL_PG
V_R20 LD A,(DE)
CP#FF
JR Z,V_R30 ; end of table
CALL EX_RAM
CP (IX+0) ; compare page number with byte contents
JR Z,V_R22 ; the page actually exists
; There is no such page on life!!!
PUSH DE
LD HL,TABL_PG+62
AND A
SBC HL,DE
PUSH HL
POP BC; table shift volume
PUSH DE
POP HL
INC HL
LDIR
DEC (IY+119) ; -1 available page
POP DE
DEC DE
V_R22 INC DEJR V_R20
; restore the contents of the bytes (#C000) on the pages
V_R30 LD B,64
LD HL,DOOM
V_R31 LD A,64
SUB B ; NN page 0,1,2,3,4...62,63
CALL EX_RAM
LD A,(HL)
LD (IX+0),A ; save byte contents
INC HL
DJNZ V_R31
RET
; "ripping" from the page table of a given page
; at the entrance:
; C - N pages
; DE - end of table (label #FF)
; at the output:
; DE - end of table (possibly already new)
DEBUG PUSH DE
POP HL
NO_PG1 DEC DE
LD A,(DE)
CP#FF
JR Z,NO_PG2 ; HE page to be deleted was found!!!
CP C
JR NZ,NO_PG1
;DE - on the number of the page to be deleted
;HL - at the end of table mark (#FF)
SBC HL,DE
PUSH HL
POP B.C.
PUSH DE
POP HL
INC HL
LDIR
DEC (IY+119) ; -1 available page
DEC HL
DEC HL
NO_PG2 EX DE,HL
RET
; page switching program for different types of machines
ONPAGE
PUSH BC; A - logical page number
PUSH HL
LD C,A
LD B,#00
LD HL,TABL_PG
ADD HL,BC
LD A,(HL) ; physical page number
POP HL
POP B.C.EX_RAM DI ; A - physical page number
PUSH HL
PUSH AF
PUSH BC
BIT 1,(IY+118)
JR NZ,ZS256 ; SCORPION (#1FFD)
BIT 2,(IY+118)
JR NZ,PROFI ; PROFI (#DFFD)
BIT 3,(IY+118)
JR NZ,TURBO_2 ; TURBO 2+ (#FFF7)
BIT 4,(IY+118)
JR NZ,ATM1 ; ATM TURBO (#FDFD)
BIT 0,(IY+118)
JR NZ,SPECCY ; SPECTRUM 128K-512K (#7FFD)
BIT 7,(IY+118)
JR NZ,SPECCY ; SCORPION 128K (#7FFD)
JR TDK
; for TURBO 2+ (supports 128K-1024K)
TURBO_2 PUSH AF
PUSH IX
AND %00011000
CPL
LD BC,#FFF7
CALL OUTC_A
POP IX
POP AF
JP SPECCY
; ATM TURBO V4.10 - 5.20 (supports 256K - 512K)
ATM1 LD BC,#FDFD
PUSH AF
RRCA
RRCA
RRCA
AND %00000011
JR HOME
; for PROFI (supports 256K-1024K)
PROFI LD BC,#DFFD
PUSH AF
RRCA
RRCA
RRCA
AND %00000111
JR HOME
; for SCORPION or KAY (supports 512K-1024K non-standard)
ZS256 PUSH AF
LD B,A
AND %00001000
RLCA
LD C,A
LD A,B
AND %00110000
RLCARLCA
ADD A,C
LD BC,#1FFD
HOME OUT (C),A
NOP
POP AF
; SPECTRUM 128K (range 256K-512K range!)
SPECCY LD B,A
AND %00011000
RLCA
RLCA
RLCA
LD C,A
LD A,B
AND %0
ADD A,C
OR #10 ; ROM 48
LD BC,#7FFD
OUT (C),A
NOP
TDK
POP BC
POP AF
POP HL
RET
OUTC_A LD IX,#2A53
PUSH IX
JP #3D2F
DEFB #FF
TABL_PG DEFB 00,01,03,04,06,07
DEFB 08,09,10,11,12,13,14,15
DEFB 16,17,18,19,20,21,22,23
DEFB 24,25,26,27,28,29,30,31
DEFB 32,33,34,35,36,37,38,39
DEFB 40,41,42,43,44,45,46,47
DEFB 48.49.50.51.52.53.54.55
DEFB 56.57.58.59.60.61.62.63
DEFB #FF
DOOM DEFS 64.0
All rights reserved, specifically, in the picture-
Price at SpbZXNet (812/03.00).
Всего хорошего.
Paul Falcon (CREATOR)
SPbZXNet: 812/03.00
. . . .
=============== Just like "OnLine76.C" ===============
In the woods, Felix.
[I.ZX]
27
From Felix Knajzev → To Alexandr Kolotuhin 5 July 2000
Greetings, O venerable Alexandr!
[Saturday July 1, 2000] at [16:25:31] Alexandr Kolotukhin wrote a letter to All.
They discussed the topic "computers." Let's continue what we started...
AK> Tell me, please:
[skip]
AK> 2. Which of the above computers, through which ports
AK> switch pages.
============== here we will start the file "OnLine44.C" ================
(C) OLDMAN
Recently, programs have begun to appear that use
additional memory PENTAGON 512. This is pleasing... But here’s the useful
Users of the other "256", "512" and "1024" feel left out.
And how cool it would be - an assembler that allows you to freely use
called "standard" 128k, or a debugger hidden somewhere
further, so as not to be discovered! I'm not even talking about commanders!
It seems that software developers for PENTAGON 512
They simply do not have information on other machines. Let's try them
be able.
Actually, all cars are made differently (valuable thought...),
but they also have something in common: additional memory pages are connected
are transmitted via a separate port, and page segments are standard,
via port #7FFD, so installation for a specific computer
made by changing two bytes.
SCORPION - port #1FFD bitmap
D0 - turns off the ROM and projects the 0th segment in its place (*)D1 - no matter... (**)
D2 - (**)
D3 - (**)
D4 - "1" enables additional memory page with #C000
D5 - (**)
D6 - (**)
D7 - (**)
PROFI - #DFFD port bitmap
D0\n
D1 - number from 0 to 7 includes corresponding pages
D2 / memory (***)
D3 - selection of segment projection window: "0" - #C000-#FFFF,
"1" - #4000-#7FFF (actually, this is also "(**)", but suddenly
need...)
D4 - turns off the ROM and projects the 0th segment in its place (*)
D5 - blocks the operation of the controller from the TR-DOS ROM and allows operation
bot with controller ports from RAM. ("(**)"?)
D6 - **
D7 - **
Notes:
* - projects, not connects, so all changes contain
pressed 0th segment will also be reflected at addresses #0000-
#3FFF (as well as vice versa).
** - actually, of course, it’s important, but... only for owners of con-
cool cars. These bits are either not used or control
external periphery and various gadgets such as a screen with
high resolution or shadow monitor. Unify
all this is complicated... I advise you to simply reset them.
*** - if SCORPION has only one additional page pa-
mint (at least for now), then PROFI may have them
as many as you like (up to 7). Moreover, they can be involved
at random, for example, PROFI 512 with additional pages -mi 1, 2 and 7... Therefore, if you want to use all
additional memory of a specific PROFI, scan all
seven possible pages and use those present.
TABLE OF SEGMENTS
┌────┬───────────────────────┐
│ │00 01 02 03 04 05 06 07│
├─┬──┼───────────────────────┤
│С│00│00 01 02 03 04 05 06 07│
│Т│01│08 09 0A 0B 0C 0D 0E 0F│
│Р│02│10 11 12 13 14 15 16 17│
│A│03│18 19 1A 1B 1C 1D 1E 1F│
│Н│04│20 21 22 23 24 25 26 27│
│I│05│28 29 2A 2B 2C 2D 2E 2F│
│Ц│06│30 31 32 33 34 35 36 37│
│ы│07│38 39 3A 3B 3C 3D 3E 3F│
└─┴──┴───────────────────────┘
Here the columns are switched by port #7FFD, and the rulers - #1FFD
for SCORPION or #DFFD for PROFI. Naturally, all segments
you can use it with only PROFI 1MB (small one
advertising...). Just don't think that I don't know about the existence
KAY, ATM, ALLEGRO, etc... I know about their existence...
Dmitry (OLDMAN)
MDM 496-8508;12:00/21:00
E-mail: zxnet@mastak.msk.su
dmitry_g@deol.ruZXNet: 095/100.1
.
=============== here we will end the file "OnLine44.C" ================
Best regards, Felix.
[I.ZX]
27
From Alexander Araktcheew → To Alexandr Kolotuhin 20 July 2000
Reply-to: 500:8362/1.10@ZXNET
Greetings, Alexandr!
Somehow Tue 4 Jul 2000 at 23:50:53 Aleksandr Majorov and Alexandr Kolotukhin
discussed computers...
Well, I decided to butt in...
AK>> 1. How to identify different types of computers from ACM:
AK>> Scorp, Kai, Proffi, ATM and others who have a memory of 256 and
AK>> above.
AK>> 2. Which of the above computers, through which ports
AK>> switch pages.
AM> This is an old, old version by Creator (I think).
AM> It even seems to work :)
AM> === begin of file AUTOconf.txt ===
[viciously cut]
It works, it works, but it determines not the type of memory, but the type of _machine_.
Therefore, if there is a car with a Pro memory port, but not Pro, but, for example,
Pentagon, then this driver will only find standard 128k and that’s it...
We ran into this when we accidentally inserted it into Extreme's Tracker.
What a bummer we were in for...
You need to determine the memory type without using special features
specific machines, such as substituting memory banks into the ROM area.
All the best, Alexandr!
Alexander aka Arc of RLDG.