384x304 (colors...)

ZXNet echo conference «real.speccy»

From Valerij Kozhevnikoff To All 21 October 2002

Hello, Dima!

Mar 24 02 13:00, Dima Bystrov -> Alexander Araktcheew:

AA>> And if you are not too lazy and solder another KP to the 512x192 circuit, then
AA>> the expanded color aka multicolor will appear on many other
AA>> cars. But everyone hasn’t needed this for 3 years already :(
DB> In fact, the “attribute per byte” does not depend on the presence of 512x192, they only have
DB> the C29 driver in common
DB> And they don’t need a KPshku, look how simple the scheme is:

[the hamster ate]

Yeah. A big request to you: when publishing schemes, describe the meaning, what they
do, what signal is for what, and where everything ends up after that. The Pentagon is not
the only computer... I haven’t even seen its diagram.
I started reading your article about 384x304, it’s written a lot and in detail, but it’s not clear
where that is... Therefore, there are three requests.

1. Draw right here the layout of the screen addresses of pixels and attributes Where
begins, where. ends, what is the size. Preferably starting from the address #C000
(screen in the page).

│ │
│ │
│ │
│ │
│ │
││
─────────────┼────────────────────────────────────┼─────────────
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
─────────────┼────────────────────────────────────┼─────────────
│ │
│ │
│ │
│ │
│ │
│ │

2. Прямо здесь напиши процедуру переброски строки пикселов.
Hачальные данные например такие:
- HL указывает на адрес строки в памяти (384 точки = 48bytes)
- BC indicates the sequence number of the line (from 0 to 303)

3. Well, and BARAXLO.Z, which was included with ZXGuide2, throw it into soap, please.

I want my GIF viewer to work on your screen too. Because pictures in low resolution on interlaced 512x192 look rather bad. Pixels
merge.

WBR, Jason.

/*e-mail: jason2000(scary dog)yandex.ru ICQ: 62235830*/

/np:/ *silence*

From Dima Bystrov To All 25 October 2002

Hello Valerij!

22 Oct 02 01:51, Valerij Kozhevnikoff wrote to Dima Bystrov:

VK> Yeah. A big request to you: when publishing diagrams, describe the meaning,
VK> what they do, what signal is for what, and where everything after that
VK> ends up.
uh-huh
I just made this diagram for myself, and that time I just copied it from a piece of paper...
and didn’t check it :( it may not work!

VK> 1. Draw the layout of the screen pixel addresses right here and attributes.
VK> Where it starts, where it ends, what is the size. Preferably starting from
VK> address #C000 (screen on the page).

VK> #c01f│#e000 #c01f│#c008
VK> │ ^ │
VK> <--?chr->│ | │<--?chr-->
VK> pg6 │ 8chr pg6 │ pg6
VK> │ | │
VK> #c7ff│#e7e0 v #e7ff│#c7e8
VK> ─────────────┼────────────────────
VK> #c01f│#e000 #e01f│#c008
VK> │ │
VK> │ │
VK> │ │
VK> ││
VK> │ │
VK> │ │
VK> pg7 │ pg7 │ pg7
VK> │ │
VK> │ │
VK> │ │
VK> │ │
VK> │ │
VK> #d7ff│#f7e0 #f7ff│#d7e8
VK> ─────────────┼────────────────────────────────────┼─────────────
VK> #d81f│#f800 ^ #f81f│#d808
VK> │ | │
VK> pg6 │ 6chr pg6 │ pg6
VK> │ | │
VK> │ | │
VK> │ v │

атрибуты:
VK> #d01f│#f000 #f01f│#d008
VK> │ │
VK> │ │
VK> pg6 │ pg6 │ pg6
VK> │ │
VK> #d0ff│#f0e0 #f0ff│#d0e8
VK> ─────────────┼────────────────────────────────────┼─────────────
VK> #d81f│#f800 #f81f│#d808
VK> │ │
VK> │ │
VK> │ │
VK> │ │
VK> │ │
VK> │ │
VK> pg7 │ pg7 │ pg7
VK> │ │
VK> │ │
VK> │ │
VK> │ │
VK> │ │
VK> #daff│#fae0 #faff│#dae8
VK> ─────────────┼────────────────────────────────────┼─────────────
VK> #d31f│#f300 #f31f│#d308
VK> │ │
VK> pg6 │ pg6 │ pg6
VK> │ │
VK> │ │
VK> │ │


/=== Begin Windows Clipboard ===/
S> in general, I’m interested in formulas that, based on x,y 0<=x<384,0<=y<304
S>, would find the color of a point... if the formulas are difficult, then the algorithm is better
S> (you can even do it in Russian :)

S> well and in order not to complicate you with bit calculations, and then I don’t need
S> to do reverse transformations, this is a better option:
S> how can I get the address
S> of the data byte and the address of the attributes using the familiarity location 0<=x<48 and the y coordinate 0<=y<304?
I’d rather do it in Russian :)

y64=y div 64
scrdisp=disp384[x div 8]+(x and 7)+(y and 56)*4
scraddr=base384[y64] + scrdisp + (y and 7)*256
attraddr=base384attr[y64] + scrdisp

where

base384[0..4]=(#c000,#4000,#4800,#5000,#d800)
base384attr[0..4]=(#d0 00,#5800,#5900,#5a00,#d300)
disp384[0..5]=(#0018,#2000,#2008,#2010,#2018,#0008)

But It should be taken into account that addresses #4000-#7fff are conditional - they refer to page 5 for
the zero screen or to page 7 for the first screen, and addresses #c000-#ffff
refer to page 4 for the zero or to page 6 for the first. In general, the base384 plate should be responsible for the distribution of addresses in the emulator, i.e. It’s better
to make it 2-dimensional (the second dimension is the screen number), or 3-dimensional (also take into account
the mode number), etc.
/=== EndWindows Clipboard ===/

VK> 2. Write a procedure for transferring a line of pixels right here.
VK> The initial data is for example like this:
VK> - HL indicates the address of the line in memory (384 points = 48 bytes)
on a real monitor there are no 384 points, there are at most 336 points :( the picture must be
centered...
VK> - BC indicates sequence number of the line (from 0 to 303)
oh...

/=== Begin Windows Clipboard ===/
COLOUR=7
ORG #8000
CALL CLS

LD BC,#EFF7
LD A,64
OUT (C),A
LD BC,303
L0
LD HL,0
HALT
PUSH BC
CALL LDIR384
POP BC
DEC BC
BIT 7,B
JR Z,L0
LD BC,#EFF7
XOR A
OUT (C),A
RET

LDIR384 LD A,C
AND 7
LD D,A
XOR C
ADD A,A
ADD A,A
LD E,A
DJNZ L384NLO
LD A,D
ADD A,#18
LD D,A
L384HI LD A,D
ADD A,#C0
LD D,A
LD A,22
JR L384OK
L384NLO LD A,C
AND #C0
JR Z,L384HI
RRCA
RRCA
RRCA
ADD A,#C0-8
ADD A,D
LD D,A
LD A,23
L384OK CALL OUTME
PUSH DE
SET 3,E
SET 4,E
LD BC,8
LDIR
POP DE
PUSH DE
SET 5,D
LD C,32
LDIR
POP DE
SET 3,E
LD C,8
LDIR
RET

CLS
; LD A,20
; CALL OUTME
; LD HL,#D000
; LD BC,#FF
; CALL CLS8+3
; LD HL,#F000
;DEC C
;CALL CLS8+3
LD A,22
CALL OUTME
LD HL,#D000
DEC C
CALL CLS8+3
LD HL,#F000
DEC C
CALL CLS8+3
CALL OUT23
LD HL,#5800
LD BC,#2FF
CALL CLS8+3
; LD HL,#7800
; LD BC,#2FF
; CALL CLS8+3
LD HL,#D800
LD BC,#2FF
CALL CLS8+3
LD HL,#F800
LD BC,#2FF
CALL CLS8+3
; LD A,20
; CALL OUTME
; LD HL,#D300
; LD BC,#FF
; CALL CLS8+3
; LD HL,#F300
;DEC C
;CALL CLS8+3
LD A,22
CALL OUTME
LD HL,#D300
DEC C
CALL CLS8+3
LD HL,#F300
DEC C
CALL CLS8+3

; LD A,20
; CALL CLS384
LD A,22
CALL CLS384
; LD HL,#4000
; CALL CLSPP
CALL OUT23
LD HL,#C000
CALL CLSPP
; LD A,20
; CALL CLS384A
LD A,22
CLS384A CALL OUTME
LD HL,#F000
CALL $+6
LD HL,#D000
LD D,H
LD E,L
INC E
LD BC,#3FF
LD (HL),COLOUR
LDIR
RET
CLSPP LD BC,6143
CALL CLS8+3
LDI
LD B,2
LD (HL),COLOUR
LDIR
LD BC,#501
ADD HL,BC
LD BC,6143
CALL CLS8+3
LDI
LD B,2
LD (HL),COLOUR
LDIR
RET
CLS384 CALL OUTME
LD HL,#C000
CALL CLS8
LD HL,#D800
CALL CLS8
LD HL,#E000
CALL CLS8
LD HL,#F800
CLS8 LD BC,#7FF
LD D,H
LD E,L
INC E
CLSMN0 LD (HL),0
LDIR
RET

OUT23 LD A,23
OUTME OR 8
PUSH BC
LD BC,32765
OUT (C),A
POP BC
RET
/=== End Windows Clipboard ===/

VK> 3. Hу и BARAXLO.Z, который к ZXGuide2 прилагался в мыло закинь, плиз.
ok
VK> Я хочу, чтобы моя GIF смотрелка работала и на твоем экране тоже. Ибо
VK> картинки в низком разрешении на интерлейсном 512х192 плоховато
VK> выглядят. Пикселы сливаются.
а как будешь отлаживать, если у тебя нет 384x304?

- Alone Coder [ZX-Guide] [ACEdit] [PT] [Chip] [STS] [AlCoNews] [ANSI][8col]

From Valerij Kozhevnikoff To All 26 October 2002

WBR, Jason.

/*e-mail: jason2000(subtitle)yandex.ru ICQ: . 62235830*/

/np:/ *silence*

From Valerij Kozhevnikoff To All 26 October 2002

VK>> <--?chr->│ | │<--?chr-->

[the hamster ate]

Oh... %-0 how to understand <--?chr->???
I have a transfer via LDIR, should I write in front of it like this: LD BC,?chr?

DB> on a real monitor there are no 384 points, there are at most 336 points :( the picture needs
DB> to be centered...

The monitors have holes in the back, you can stick a screwdriver in them and use
variables to center anything. And I have an EGA monitor, it
initially shows the entire border.
And the pictures are mostly 800x600, they cannot be centered, they need to be scrolled.

From Dima Bystrov To All 29 October 2002

VK> I don’t have 384x304? Where did you come to this conclusion?
if you had it, you would easily figure out the screen layout :)

From Dima Bystrov To All 29 October 2002

DB>> the picture needs to be
DB>> centered...
VK> The monitors have holes in the back, you can put a screwdriver in them and with the help of
VK> you can center anything.
yeah, and so constantly stand with a screwdriver in a DJ pose, wrap up what
has slipped :) and not on everyone TV has a horizontal scale! :)
VK> And my monitor
VK> is EGA, it initially shows the entire border.
lucky...
VK> And the pictures in
VK> are basically 800x600, you can’t center them, you need to scroll them.
that’s why I say - the width of the window is 336, in order to orient yourself - what are the extreme
positions of the picture when scrolling (so that at the extreme positions it was possible
to see the edges of the picture on any monitor)