Short: Demon Attack (Imagic 1982) for the Amiga Author: radi777 Uploader: radi777 Type: game/actio Version: 1.0 Requires: ECS Agnus, 60 Hz capable monitor, original Demon Attack ROM Architecture: m68k-amigaos >= 2.0 Distribution: Aminet AmiDemons is a conversion of Demon Attack (Imagic, 1982) from the Atari 2600 to the Amiga. Not a remake and not a reinterpretation: the goal was that it does exactly what the original does, pixel for pixel and note for note. THE ROM The archive contains no ROM data whatsoever. Graphics, colours and tables are read at startup from the ROM you supply. The checksum is verified; if it does not match, the program stops with a message. You need the USA version: Demon Attack (USA) 4096 bytes CRC32 818927C1 MD5 f0e0addc07971561ab80d9abe1b8d333 SHA1 a580d886c191a069f6b9036c3f879e83e09500c2 The file must be called demonatk.bin and sit next to the program. RUNNING IT Put the program and the ROM in the same drawer: AmiDemons AmiDemons.info demonatk.bin title.iff (optional, the title picture) Controls.iff (optional, the second title picture) AmiDemons-Ton.iff (optional, 8SVX sound for the title screen) Double-click, or start it from the shell. The two title pictures alternate every two seconds, with the sound looping underneath, and stay up until you press fire. With no input the game plays itself, in attract mode ? that one is silent, and so is the original. Joystick port 1 move the ship, button fires F1 / right mouse start a game (RESET on the machine) F5 select game variant (SELECT on the machine) Esc / left mouse quit There are sixteen variants: one or two players, straight or tracking shot, starting at wave 1 or 11. F5 cycles, F1 starts. The power LED goes dark while it runs. That is deliberate: the audio low-pass filter of the A500 hangs on the same wire, and the TIA lives on its harmonics. It comes back on when you quit. WHAT THE MACHINE NEEDS Kickstart 2.0 (graphics.library 36 or newer) ECS Agnus 8372A or 8375 ? it does not run on an OCS Agnus 68000 the program is compiled for a plain 68000 about 44 KB chip RAM for the game, plus room for title picture and music a monitor that can do 60 Hz The Agnus requirement is not convenience. This is an NTSC game, 60 frames per second, and the 2x1 pixel mapping of the TIA is the whole point. A 50 Hz PAL picture would be a different game. The program switches the native output to NTSC and puts it back when it quits ? that needs an ECS Agnus. HOW IT IS BUILT Picture. 320x192 lowres, every TIA pixel twice as wide. Drawn with sprites and the copper, not with a software rasterizer: per frame only copper colours and sprite data go into chip RAM. The machine it was written for is an A500 with a PiStorm, where chip RAM is some three hundred times slower than fast RAM. Operating system. It stays alive. LoadView(NULL), our own copper list, sprites and Paula by hand ? but no Forbid, no Disable, and the Workbench comes back untouched. Keys go through a handler in input.device that passes every event on unchanged. Collisions. Done in software, but with the semantics of the TIA: a hit comes from overlapping set pixels, not from neighbouring coordinates. That is why you can shoot through the gap in the middle of a demon ? same as on the original. Sound. No samples. The TIA makes its noises from two feedback shift registers and a few dividers; the sixteen wirings sit in chip RAM as waveforms, 3.4 KB altogether. The playback rate comes out even because both chips hang on the same colour clock: Paula period = 114 * (AUDF + 1) Title screen. The two pictures are 640x400 in sixteen colours, shown interlaced on both fields ? which takes a vertical blank server of our own: the graphics library resets the LOF bit to "long" every frame, so a server below it in priority has to set the bit again afterwards. Without that you get the same field twice and half the picture. The sound is an 8SVX at 31440 Hz, looping on two channels; Paula plays at most 65535 words in one go, so the sample is handed to her block by block, and each block's end is picked up from INTREQR in the frame loop instead of an interrupt. Verified byte by byte. The game logic runs against a RAM trace of the original taken from a 2600 emulator ? 124 of the 128 RAM cells, frame by frame, plus all six sound registers. Seven of eight test runs are completely identical over 11133 frames: dying through to game over, variant select, two players, played waves. Not "looks the same" ? the same bytes. KNOWN POINTS - A collision in the lower part of the screen is occasionally detected one or two frames later than in the original. It does not show while playing, but it is not solved either. - There is no WHDLoad slave yet. - Tested on an A500 with PiStorm and on an A1200. Reports from other machines are welcome, with model, Agnus, Kickstart and monitor. Demon Attack is a trademark of its respective owner. This is an independent conversion; it contains no code or data from the original cartridge and does not work without a ROM that you own yourself.