ZX Review #11-12
26 ноября 1997

Forum - Conversion of Spectrum color images at IBM. Conversion of B / W images from IBM's ZX Spectrum.

<b>Forum</b> - Conversion of Spectrum color images at IBM. Conversion of B / W images from IBM's ZX Spectrum.
           *


            HELLO!!!

   Write to you Max 'Alex from
"CYBERAX Software" (Kemerovo).

   After a long break, we have 3-4 issues ZX-REVIEW. 
Admittedly, we are not very happy electronic format of the 
journal, although We do not own cluster Spectrum: the printed 
version is much easier to read (you can even sensitive 
vshrapnut, covered his face with your favorite magazine ...) 
and much more easier to type out her listings

programs (by the way, once you have moved to electronic form, 
then why do not you make a

Journal of procedures from text files of articles in popular 
formats assemblers, for example, MASM, ZEUS, XAS, and others??) 


   During his absence from the magazine
We have accumulated a large number of procedures, of which we


would like to share with readers the ZX-REVIEW.

   The first procedure is designed to convert color images 
Spectrum at IBM. The result of her work is 16tsvetnaya image 
256 * 192 points in as BMP, which can then be transferred to 
the MS-DOS to any relevant copiers (ISDOS Copy, IBMCOPY, etc.) 

   The resulting image can be loaded into any image editor for 
IBM, print (eg, a color printer) convert, etc.


   Now, the procedure itself:
140.

        ORG 35000

        LD HL, HEADER

        LD DE, PIC

        LD BC, 120

        LDIR

        LD HL, PIC +24566

        LD (LINE), HL

        LD A, 192

        LD (YS), A

        LD HL, 16384

        LD (SCADR), HL
MAIN LD B, 32
CYCLE LD HL, (SCADR)

        LD C, (HL)

        LD A, H

        SRL A

        SRL A

        SRL A

        OR 88

        LD H, A

        LD A, (HL)

        LD (ATR), A

        LD D, 4
LOOP SLA C

        PUSH DE

        CALL PSET

        POP DE

        LD E, A

        SLA E

        SLA E

        SLA E

        SLA E

        SLA C

        PUSH DE

        CALL PSET

        POP DE

        OR E

        LD HL, (LINE)

        LD (HL), A

        INC HL

        LD (LINE), HL

        DEC D

        JR NZ, LOOP

        LD HL, (SCADR)

        INC HL

        LD (SCADR), HL

        DJNZ CYCLE

        LD HL, (LINE)

        LD DE, 256

        OR A

        SBC HL, DE

        LD (LINE), HL

        LD HL, (SCADR)

        LD DE, 32

        OR A

        SBC HL, DE

        INC H

        LD A, H

        AND 7

        JR NZ, DCONT

        LD A, L

        ADD A, 32

        LD L, A

        JR C, DCONT

        LD A, H

        SUB 8

        LD H, A
DCONT LD (SCADR), HL

        LD A, (YS)

        DEC A

        LD (YS), A

        JP NZ, MAIN

        RET
PSET JR NC, PAPER

        LD A, (ATR)

        LD E, A

        AND 7

        LD D, A

        LD A, E

        AND 64

        RRCA

        RRCA

        RRCA

        OR D

        LD H, 0

        LD L, A

        LD DE, TABLE

        ADD HL, DE

        LD A, (HL)

        RET
PAPER LD A, (ATR)

        AND 120

        RRCA

        RRCA

        RRCA

        LD H, 0

        LD L, A

        LD DE, TABLE

        ADD HL, DE

        LD A, (HL)

        RET
LINE DW 0
SCADR DW 0
YS DB 0
ATR DB 0
TABLE DB 0,4,1,5,2,6,3,7,0

        DB 12,9,14,10,14,11,15
PIC EQU 40704
HEADER DW # 4D42, # 6076, # 0000, # 0000

        DW # 0000, # 0076, # 0000, # 0028

        DW # 0000, # 0100, # 0000, # 00C0

        DW # 0000, # 0001, # 0004, # 0000

        DW # 0000, # 6000, # 0000, # 0ECE

        DW # 0000, # 0EC4, # 0000, # 0000

        DW # 0000, # 0000, # 0000, # 0000

        DW # 0000, # 0000, # 0080, # 8000

        DW # 0000, # 8000, # 0080, # 0080

        DW # 0000, # 0080, # 0080, # 8080

        DW # 0000, # C0C0, # 00C0, # 8080

        DW # 0080, # 0000, # 00FF, # FF00

        DW # 0000, # FF00, # 00FF, # 00FF

        DW # 0000, # 00FF, # 00FF, # FFFF

        DW # 0000, # FFFF, # 00FF, # 0000
2

   Now about how to use the procedure: assembliruete it
Spectrum upload the picture on the screen with the address 
16384 and start the procedure. After that, the memory address 
40704 contains a block length 24694 bytes which will need to 
copy in MS-DOS with the extension BMP.



   The second procedure performs
inverse problem - to convert
black and white picture with IBM on
SPECTRUM (256 * 192 points, the length of
6,206 bytes, the extension BMP), of course, previously migrated 
to the TR-DOS. 

   Here is its listing:
140.

        ORG 40000

        LD C, 192

        LD HL, PIC +6174

        LD DE, 16384
LP1 PUSH HL

        PUSH DE

        LD B, 32
LP2 LD A, (HL)

        LD (DE), A

        INC HL

        INC DE

        DJNZ LP2

        POP DE

        POP HL

        LD A, L

        SUB 32

        LD L, A

        LD A, H

        SBC A, 0

        LD H, A

        INC D

        LD A, D

        AND 7

        JR NZ, C1

        LD A, E

        ADD A, 32

        LD E, A

        JR C, C1

        LD A, D

        SUB 8

        LD D, A
C1 DEC C

        JR NZ, LP1

        RET
PIC EQU 45000
2

   Assembliruete it, ship the original image at address 45000,
start the procedure and get on the screen converted
image in the Spectrum
(Alas, no attributes ...)







Other articles:

Authoring - S. Zonov, A. Larchenko. On the controller SMUC (HDD IBM and peripherals).

Computer novella - Warriors Stars (the game Shadowfire).

New Programs - Overview of Digital Studio v1.12, Digital Studio Compiler v1.01

New Programs - Xas Review editor-assembler 128K (v5.05).

New Programs - Review of Musical Instrument v3.01 editor

New Programs - Overview of programs and FASTzasm @-zasm.

New Programs - Overview of No Kempston.

professional approach - Algorithms for the construction and transmission of labyrinths.

laugh for no reason ... - Proceedings of the humor magazine SpectrofUn.

Expert Tips - Game FEUD.

Expert Tips - Game Killed Until Dead.

Expert Tips - Game War in Middle Earth.

Forum - Conversion of Spectrum color images at IBM. Conversion of B / W images from IBM's ZX Spectrum.

Forum - On the Russification of game programs.

Forum - The program detector emulator.

Forum - A procedure with colored stripes on the curb. " Noise Reduction FDD.

Forum - The transfer numbers in decimal form. Procedure - scanner password.

Forum - Unprotect Microprotector'a.

Forum - Emulators, which we choose: 'UKV Spectrum Debugger', 'Z80TRDOS'.

reader-reader - Driver input in serial mode and direct access from the files of TR-DOS.

Studies - Graphic effect "Plasma 2.

Studies - Graphic effect "Plasma 2.

Studies - Graphic effect "plasma".

Studies - Useful tips. Rapid transfer of your screen.

Studies - remake of the procedures in 1993.

Studies - The effect of "flame".


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
666 bytes From the editor - On the shell.
Maxx - New Krasnodar modem newspaper.
Credits - the authors of the paper.

В этот день...   21 November