Inferno #08
30 ноября 2005

For Coderz - CD video on the ZX. How to write a video player with CD-ROM.

<b>For Coderz</b> - CD video on the ZX. How to write a video player with CD-ROM.
        CD video to ZX

   To learn how to write a video player with whom
pact disc, says the author of the very
player, which was shown on CAFe'2003.
Unfortunately, the player has not survived. Dan
nym issue also addressed PSB and slightly
zhko I (Alone Coder). Personally, I experiment
roval only 16 (15)-color video - there
there are some interesting challenges IAN
forging, etc.


              CD video to ZX


   For the sound, of course, need 2 buffer.
Naturally, the data is stored as
[Image] [audio] [image] [sound] ...

   Since sidyuki data of one sector
pass very quickly, we can not wait
availability of data within the sector but only
before reading.

   I have done so: dekryunchitsya procedure
pa read one sector (2k), which,
where necessary, setting up audio output (for ka
Qualitatively, the sound can be more povstavlyat
NOP'ov or INC HX. I've still got the number itself
proof cycles between the audio output is given by
as a fixed point):



         LD C, E: INI

         LD C, D: INI

         LD C, E: INI

         LD C, D: INI

         ...

         [NOP / INC HX]

         EXX

         OUTI

        EXX


         LD C, E: INI

         LD C, D: INI

         LD C, E: INI

         LD C, D: INI

         ...

         [NOP / INC HX]

         EXX

         OUTI

        EXX

        etc.


   So how to read the pieces are not multiples of 2k
and not coinciding with the beginning of the sector (6144 -
screen and 2048 - the sound is not very Wheels: brake
but also weighs a lot), in the end is in JP on
chalo, and is used frequently and / or procedure
completely (floating RET). I is designed to
a procedure that reads from the current
the situation in Gaza right amount of bytes
and / or sectors. It can be used as follows:



         LD BC, size

         LD HL, buff

        CALL read


   And more specifically:



         LD BC, 6912

         LD HL, # 4000

        CALL read


         LD BC, 1280

         LD HL, sndbuf0

        CALL read


   Still, as should be expected readiness
drive and at the same time a sound is needed
procedure such as:

 w_snd

         CALL w_cd

         RET Z

         NOP; to fig NOP'ov

         EXX

         OUTI

         EXX

         ...

        JP w_snd


   Desirable to put checks on windows
see Note the buffer (and / or add zeros after the
buffer). For sound quality it is desirable that
procedure to do more (if quantitative
in contacts between the sound output is not an integer).

   Still, if you use some eq
wound (sprite) - n familiarity in width (at
This can save you a lot), it is necessary
make a table of addresses for screens and for
buffers with a sound and change the code:



        POP HL; here every n bytes

                 , Read a new address

         LD C, E: INI

         LD C, D: INI

         ...

        POP HL; here every n bytes

                 , Read a new address

         LD C, E: INI

         LD C, D: INI

         ...

         [NOP / INC HX]

         EXX

         OUTI

        EXX


   Naturally, this approach koliches
GUT sound bytes per frame must be a multiple
n. And yet, 2048, must be divisible by n without
balance (though if a little crap, you can
 zhno without it).

   Ed.: Sound must be many - with reserves
som! The fact is that about once in 10 sectors
ditch waiting for a new sector drags
on an eerie life - more than 20000 taktov.Prichem
regardless of the speed (1x/8x /...)!
Reasons are not clear.

   The general structure of such a procedure, read:



       [Define how and where to read]

      [Insert 'RET']

     [JP where necessary]



         /

    > [Send command CD-ROM'u]

    > [Expected availability]

      > [Read]



   You can use the read command
group of sectors (in the sense that amount of sectors
set> 1) not to send team
every sector - but not all drives
like it (my DVD on it and complains
refuses to read). But with the abolition of the current
teams are generally very difficult - if
stop reading (RESET, for example), then later
difficult to 'reach out' to drive - hard
understand how the zero team he wants.

Hedgehog (Alexander Neganov)




Other articles:

Inferno - The authors of the magazine.

Inferno - Entered from the editor.

Inferno - Errors in the previous numbers.

Inferno - On the shell.

Iron - CD-ROM - a device and Tricks connection.

For Coderz - CD video on the ZX. How to write a video player with CD-ROM.

Softinka - Technical Reference disk system DISCiPLE / + D.

For Coderz - Small programmers' tricks.

Mathematics - The history of the solution of Fermat's theorem.

Gameland - Game Shestnashki.

Softinka - a description and history of the program to work with hard disk HDDoctor v0.9.

Secrets - The X button in different applications: Wolfenstein'2004, IG # 5, ACEdit, DNA OS, Wild Disk Copier.

Softinka - Improved graphics converter Gigascreen.

Sound - tube amplifier. Stereo lampochnik 2x5 Tues of old TVs.

Iron - Overview of cassette players.

Inferno - Letters to the Editor.

Gamedev - The history of the game Pang.

Gamedev - Tips for writing an arcade game.

Advertising - Ads by Roman Chuunin.

Advertising - Ads by Alexei Zhabina.

Advertising - Ads by V. Bogdanovich.

Interview - Interview with Nikolay Rodionov, author of popular books for the ZX Spectrum

For Coderz - The calculation of trigonometric and algebraic functions in a high-level languages.

DIY - scheme of 16-color video mode v1.1 for the Pentagon.

Iron - Description of Products K555TL2.

For Coderz - Programming device sound generation Turbo Sound.

Softinka - 384x304 viewer. program allows you to view color pictures, is larger than the screen.

Softinka - ZX Spectrum emulator for ZX Spectrum.


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

Similar articles:
Entry - Guide to the shell of the magazine.
From the Editor - the story of creating a magazine.
Advertising - Advertising and announcements.

В этот день...   29 April