; Title - hi-res ; By - Adam Trionfo ; REV. 1.2 - June 5, 2004 ; - This program NO longer seems to even ; run under the MESS emulator... ; 1.1 - Nov. 30, 2003 ; - Made compatible with HVGLIB.H ; 1.0 - March 22, 2002 ; ; This program could not have been written without using ; Mike White's "Astro BASIC 4x2 Multicart Loader" and ; and the "Nutting Manual" as a reference. ; ; ; About this Program ; ------------------ ; ; Displays, in hi-res, 16 pixels starting at $4000 ; (the top-left side of the screen). ; The colors are repeated twice (two whites together, ; two blacks together, etc) so that they can be ; disguised from each other. This program works on ; the Astrocade emulator (it doesn't ANYMORE!), ; but not a real Astrocade. ; This program only displays in the top-left 1/4 of the ; screen (since the Astrocade only has 4K of RAM and ; this isn't really "true" hi-res [there's not 16K]). ; ; Assembling this Program ; ----------------------- ; This file will assemble with ZMAC 1.3 (a little ; known, freely distributable Z-80 assembler (with C ; source), that has a 25-year history. ZMAC can be ; compiled under just about any O.S. in existence, so ; try it out. ; ; To assemble Z-80 source code using ZMAC: ; ; zmac -i -m -o -x ; ; For example, to assemble this Astrocade Z-80 program: ; ; zmac -i -m -o hi-res.bin -x hi-res.lst hi-res.asm INCLUDE "HVGLIB.H" ; Home Video Game Library Header ORG FIRSTC ; First byte of Cartridge JP PRGST ; Program Start PRGST: DI ; Disable interrupts LD A,$01 ; Set system into high-res OUT (CONCM),A SYSTEM (INTPC) ; Start System Interpreter DO (SETOUT) ; Set Display Ports DB 176D ; Vertical Blanking Line DB 1D ; Left/Right Color Boundary DB $18 ; Interrupt Mode DO (COLSET) ; Set Color Registers DW COLTAB ; Color Table DO (FILL) ; Screen Fill DW $4000 ; Destination DW 4000D ; Bytes to move DB $00 ; Fill with zeros DO (MOVE) ; Move Bytes DW $4000 ; Destination DW 4D ; Bytes to move (two) DW TOMOVE ; Source Address EXIT ; Exit System Interpreter EI ; Enable interrupts LOOP: NOP ; Endless loop JP LOOP ; End of program ; Program Data ; Color Table #1 COLTAB: DB $04 ; Color 3 Left DB $05 ; Color 2 Left DB $06 ; Color 1 Left DB $07 ; Color 0 Left - White DB $00 ; Color 3 Right - Black DB $01 ; Color 2 Right DB $02 ; Color 1 Right DB $03 ; Color 0 Right ; Bytes to move TOMOVE: DB 00000101B ; Four pixels (0,1,2,3) DB 10101111B ; Four pixels (0,1,2,3) DB 00000101B ; Four pixels (0,1,2,3) DB 10101111B ; Four pixels (0,1,2,3) ; End of Program