mads 2.1.3 build 45 (7 Jun 21)
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm
     1 				/***************************************/
     2 				/*  Use MADS http://mads.atari8.info/  */
     3 				/*  Mode: VBXE                         */
     4 				/***************************************/
     5
     6 					icl "sergeantseymour-robotcop.h"
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.h
   275 					opt l+
     7
     8 					org $f0
     9
    10 = 00F0			fcnt	.ds 2
    11 = 00F2			fadr	.ds 2
    12 = 00F4			fhlp	.ds 2
    13 = 00F6			cloc	.ds 1
    14 = 00F7			regA	.ds 1
    15 = 00F8			regX	.ds 1
    16 = 00F9			regY	.ds 1
    17
    18 = 0028			WIDTH	= 40
    19 = 001E			HEIGHT	= 30
    20
    21 				; ---	BASIC switch OFF
    22 					icl "sergeantseymour-robotcop.vbx"
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.vbx
     1 				;VBXE CORE FX rev. 1.21+
     2 				;support file for MADS
     3
     4 = 0000			VBASE           equ     0  ;for indirect addresing
     5 				;VBASE          equ     0xd600
     6 				;VBASE          equ     0xd700
     7
     8 = 0040			FX_VIDEO_CONTROL equ    VBASE+0x40
     9 = 0040			FX_VC            equ    FX_VIDEO_CONTROL
    10 = 0001			VC_XDL_ENABLED  equ     1
    11 = 0002			VC_XCOLOR       equ     2
    12 = 0004			VC_NTR          equ     4
    13 = 0004			VC_NO_TRANS     equ     VC_NTR
    14 = 0008			VC_TRANS15      equ     8
    15
    16 				; XDL Address
    17 = 0041			FX_XDL_ADR0     equ     VBASE+0x41
    18 = 0042			FX_XDL_ADR1     equ     VBASE+0x42
    19 = 0043			FX_XDL_ADR2     equ     VBASE+0x43
    20
    21 				; Palette registers
    22 = 0044			FX_CSEL         equ     VBASE+0x44
    23 = 0045			FX_PSEL         equ     VBASE+0x45
    24 = 0046			FX_CR           equ     VBASE+0x46
    25 = 0047			FX_CG           equ     VBASE+0x47
    26 = 0048			FX_CB           equ     VBASE+0x48
    27
    28 				; Raster collision detection
    29 = 0049			FX_COLMASK      equ     VBASE+0x49
    30 = 004A			FX_COLCLR       equ     VBASE+0x4a
    31 = 004A			FX_COLDETECT    equ     VBASE+0x4a
    32
    33 				; XDLC bits
    34 = 0001			XDLC_TMON       equ     1
    35 = 0002			XDLC_GMON       equ     2
    36 = 0004			XDLC_OVOFF      equ     4
    37 = 0008			XDLC_MAPON      equ     8
    38 = 0010			XDLC_MAPOFF     equ     0x10
    39 = 0020			XDLC_RPTL       equ     0x20
    40 = 0040			XDLC_OVADR      equ     0x40
    41 = 0080			XDLC_OVSCRL     equ     0x80
    42 = 0100			XDLC_CHBASE     equ     0x100
    43 = 0200			XDLC_MAPADR     equ     0x200
    44 = 0400			XDLC_MAPPAR     equ     0x400
    45 = 0800			XDLC_OVATT      equ     0x800
    46 = 0800			XDLC_ATT        equ     0x800
    47 = 1000			XDLC_HR         equ     0x1000
    48 = 2000			XDLC_LR         equ     0x2000
    49 = 8000			XDLC_END        equ     0x8000
    50
    51 				; MEMAC-A / MEMAC-B registers
    52 = 005D			FX_MEMAC_B_CONTROL equ     VBASE+0x5d
    53 = 005D			FX_MEMB            equ     FX_MEMAC_B_CONTROL
    54 = 005E			FX_MEMAC_CONTROL   equ     VBASE+0x5e
    55 = 005E			FX_MEMC            equ     FX_MEMAC_CONTROL
    56 = 005F			FX_MEMAC_BANK_SEL  equ     VBASE+0x5f
    57 = 005F			FX_MEMS            equ     FX_MEMAC_BANK_SEL
    58
    59 				; MEMAC-A control bits (in MEMC)
    60 = 0008			MCE             equ     8
    61 = 0004			MAE             equ     4
    62 = 0000			M4K             equ     0
    63 = 0001			M8K             equ     1
    64 = 0002			M16K            equ     2
    65 = 0003			M32K            equ     3
    66 				; MEMAC-A global enable (in MEMS)
    67 = 0080			MGE             equ     $80
    68 				; MEMAC-B control bits (in MEMB)
    69 = 0080			MBCE            equ     $80
    70 = 0040			MBAE            equ     $40
    71 				; MEMAC-B fixed window address
    72 = 4000			MEMAC_B_WINDOW  equ     $4000
    73
    74 				; Blitter registers
    75 = 0050			FX_BL_ADR0       equ   VBASE+0x50
    76 = 0051			FX_BL_ADR1       equ   VBASE+0x51
    77 = 0052			FX_BL_ADR2       equ   VBASE+0x52
    78 = 0053			FX_BLITTER_START equ   VBASE+0x53
    79 = 0050			FX_BLT_COL_CODE  equ   VBASE+0x50
    80 = 0050			FX_BLT_COLLISION_CODE equ FX_BLT_COL_CODE
    81 = 0053			FX_BLITTER_BUSY   equ   VBASE+0x53
    82
    83 				; Blitter IRQ
    84 = 0054			FX_IRQ_CONTROL   equ   VBASE+0x54
    85 = 0054			FX_IRQ_STATUS    equ   VBASE+0x54
    86
    87 				; Info registers (read only)
    88 = 0040			FX_CORE_VERSION   equ   VBASE+0x40
    89 = 0041			FX_MINOR_REVISION equ   VBASE+0x41
    90
    91 				; Priority registers
    92 = 0055			FX_P0           equ     VBASE+0x55
    93 = 0056			FX_P1           equ     VBASE+0x56
    94 = 0057			FX_P2           equ     VBASE+0x57
    95 = 0058			FX_P3           equ     VBASE+0x58
    96
    97 = D080			FX_CORE_RESET   equ     0xD080
    98
    99
   100 				        .zpvar fxptr .word
   101 				        .zpvar fxysav .byte
   102
   103 = 0010			FX_PROPER_CORE_VERSION = 0x10
   104 = 0020			FX_PROPER_MINOR_REVISION = 0x20
   105
   106 				; fx core detection
   107 				; exit: Z=1 -> fx core 1.10 found
   108
   109 				DetectCore .macro
   110 				
   111 				        mwa     #0xd600 fxptr
   112 				        jsr     fxd
   113 				        jeq     ex
   114 				        inc     fxptr+1
   115 				        jsr     fxd
   116 				        jmp     ex
   117 				fxd     fxla    FX_CORE_VERSION
   118 				        cmp     #FX_PROPER_CORE_VERSION
   119 				        jne     nf
   120 				        fxla    FX_MINOR_REVISION
   121 				        and     #$70
   122 				        cmp     #FX_PROPER_MINOR_REVISION
   123 				nf      rts
   124 				ex
   125 				
   126 				        .endm
   127
   128 				ResetCore .macro
   129 				
   130 				        ;FX core reset
   131 				        mva     #0 FX_CORE_RESET   ;reset & resync
   132 				        ;reset all fx core registers
   133 				        ldy     #0x40
   134 				r2      sta     (fxptr),y
   135 				        iny
   136 				        bpl     r2
   137 				        ;restore default palette 0
   138 				        fxsa    FX_CSEL
   139 				        fxsa    FX_PSEL
   140 				        tax
   141 				r1      lda     fx_default_palette0,x
   142 				        asl     @
   143 				        fxsa    FX_CR
   144 				        lda     fx_default_palette0+256,x
   145 				        asl     @
   146 				        fxsa    FX_CG
   147 				        lda     fx_default_palette0+512,x
   148 				        asl     @
   149 				        fxsa    FX_CB
   150 				        inx
   151 				        bne     r1
   152 				        ;clear default palette 1, 2, 3
   153 				        fxs     #1 FX_PSEL
   154 				        jsr     c0
   155 				        fxs     #2 FX_PSEL
   156 				        jsr     c0
   157 				        fxs     #3 FX_PSEL
   158 				        jsr     c0
   159 				        fxsa    FX_PSEL  ;leave PSEL=0 when done
   160 				        jmp     ex
   161 				c0      ldx     #0
   162 				        txa
   163 				c1      fxsa    FX_CR
   164 				        fxsa    FX_CG
   165 				        fxsa    FX_CB
   166 				        inx
   167 				        bne     c1
   168 				        jmp     ex
   169 				
   170 				fx_default_palette0
   171 				
   172 				        icl     'fxpal.asm'
   173 				
   174 				ex
   175 				
   176 				        .endm
   177
   178
   179 				; store value in fx register (via accumulator)
   180 				fxs     .macro
   181 				
   182 				        lda     :1
   183 				        ldy     #:2
   184 				        sta     (fxptr),y
   185 				
   186 				        .endm
   187
   188 				; store accumulator in fx register
   189 				fxsa    .macro
   190 				
   191 				        ldy     #:1
   192 				        sta     (fxptr),y
   193 				
   194 				        .endm
   195
   196 				; load fx register value to accumulator
   197 				fxla    .macro
   198 				
   199 				        ldy     #:1
   200 				        lda     (fxptr),y
   201 				
   202 				        .endm
   203
   204 				; store value in fx register (via accumulator) protect y
   205 				fxsp    .macro
   206 				
   207 				        sty     fxysav
   208 				        lda     :1
   209 				        ldy     #:2
   210 				        sta     (fxptr),y
   211 				        ldy     fxysav
   212 				
   213 				        .endm
   214
   215 				; store accumulator in fx register protect y
   216 				fxsap   .macro
   217 				
   218 				        sty     fxysav
   219 				        ldy     #:1
   220 				        sta     (fxptr),y
   221 				        ldy     fxysav
   222 				
   223 				        .endm
   224
   225 				; load fx register value to accumulator protect y
   226 				fxlap   .macro
   227 				
   228 				        sty     fxysav
   229 				        ldy     #:1
   230 				        lda     (fxptr),y
   231 				        ldy     fxysav
   232 				
   233 				        .endm
   233 = 0080			FXPTR
   233 = 0082			FXYSAV
    23
    24 					org $2000
    25
    26 					.zpvar	= $f0
    27
    28 2000			detect	DetectCore
Macro: DETECTCORE [Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.vbx]
     2 FFFF> 2000-20FD> A9 00 +         mwa     #0xd600 fxptr
     3 2008 20 15 20		        jsr     fxd
     4 200B F0 19		        jeq     ex
     5 200D E6 81		        inc     fxptr+1
     6 200F 20 15 20		        jsr     fxd
     7 2012 4C 26 20		        jmp     ex
     8 2015			fxd     fxla    FX_CORE_VERSION
Macro: FXLA [Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.vbx]
     2 2015 A0 40		        ldy     #FX_CORE_VERSION
     3 2017 B1 80		        lda     (fxptr),y
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm
     9 2019 C9 10		        cmp     #FX_PROPER_CORE_VERSION
    10 201B D0 08		        jne     nf
     2 201D A0 41		        ldy     #FX_MINOR_REVISION
     3 201F B1 80		        lda     (fxptr),y
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm
    12 2021 29 70		        and     #$70
    13 2023 C9 20		        cmp     #FX_PROPER_MINOR_REVISION
    14 2025 60			nf      rts
    15 2026			ex
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm
    29 2026 B0 1D			bcs ok
    30 2028 20 46 20			jsr printf
    31 202B 9B				dta $9b
    32 202C 43 6F 72 65 20 72 + 	dta c'Core revision < 1.20',$9b,0
    33
    34 2042 68				pla
    35 2043 68				pla
    36 2044 60				rts
    37
    38 2045 60			ok	rts
    39
    40 2046 18 68 69 01 85 32 + 	.link 'printf.obx'
    41
    42 02E2-02E3> 00 20			ini detect
    43
    44 				; ---	VBXE XDLIST, COLORS MAP
    45
    46 					org $0600
    47 0600			vbxe_bank_on
    48 0600				fxs vbxe_bank FX_MEMB		;enable VBXE BANK #0 MEM = $4000..$7FFF
Macro: FXS [Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.vbx]
     2 0600-0612> AD 0B 06	        lda     VBXE_BANK
     3 0603 A0 5D		        ldy     #FX_MEMB
     4 0605 91 80		        sta     (fxptr),y
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm
    49 0607 EE 0B 06			inc vbxe_bank
    50 060A 60				rts
    51 060B 80			vbxe_bank	dta $80
    52
    53 060C			vbxe_bank_off
    54 060C				fxs #$00 FX_MEMB		;disable VBXE BANK #0 MEM = $4000..$7FFF
Macro: FXS [Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.vbx]
     2 060C A9 00		        lda     #$00
     3 060E A0 5D		        ldy     #FX_MEMB
     4 0610 91 80		        sta     (fxptr),y
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm
    55 0612 60				rts
    56
    57 02E2-02E3> 00 06			ini vbxe_bank_on
    58
    59 					org MEMAC_B_WINDOW
    60 = 4000			xdlist	equ *
    61
    62 					;XDLC
    63 					;włączam mapę koloru pokrywającą 240 linii
    64 					;jednocześnie jest to koniec XDL (XDLC_END)
    65 4000-4013> 68 8F			.word	XDLC_END|XDLC_RPTL|XDLC_MAPON|XDLC_MAPADR|XDLC_OVADR|XDLC_CHBASE|XDLC_MAPPAR|XDLC_OVATT
    66
    67 					;XDLC_RPTL
    68 					;razem 240 linii z mapą koloru
    69 4002 EF				.byte	240-1
    70 					
    71 4003 00 10 00			.long $1000
    72 					
    73 4006 40 01			.word 320
    74 					
    75 4008 02				.byte 2
    76
    77 					;XDLC_MAPADR
    78 					;adres mapy koloru bezpośrednio za XDL w pamięci VBXE
    79 4009 00 40 00			.long	$4000
    80
    81 					;krok adresu mapy
    82 400C A0 00			.word	40*4
    83
    84 					;XDLC_MAPPAR
    85 400E 00				.byte	0 ;hscroll mapy
    86 400F 00				.byte	0 ;vscroll mapy
    87 4010 07				.byte	8-1 ;szerokość pola
    88 4011 07				.byte	8-1 ;wysokość pola
    89
    90 					;XDLC_OVATT
    91 4012 11				.byte %00010001	; screen 40 bytes
    92 4013 FF				.byte $ff
    93
    94 02E2-02E3> 00 06			ini vbxe_bank_on
    95
    96
    97 = 12C0				?l=.len "D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.cmp"
    98 					.rept [?l/16384]+[[?l%16384]<>0]
   100 					ORG MEMAC_B_WINDOW
   101 					IFT ?L>=16384
   102 					INS "D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.cmp",#*16384,16384
   103 					ELS
   104 					INS "D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.cmp",#*16384,?L
   105 					EIF
   107 					?L-=16384
   108 					INI VBXE_BANK_ON
   109 					.ENDR
   109 					.endr
Source: REPT
    99 					ORG MEMAC_B_WINDOW
    99 					IFT ?L>=16384
    99 					INS "D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.cmp",#*16384,16384
    99 					ELS
    99 4000-52BF> 00 00 00 18 + 	INS "D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.cmp",#*16384,?L
    99 					EIF
    99 = FFFFD2C0			?L-=16384
    99 02E2-02E3> 00 06			INI VBXE_BANK_ON
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm
   110
   111 02E2-02E3> 0C 06			ini vbxe_bank_off
   112
   113
   114 				; ---	MAIN PROGRAM
   115 					org $2000
   116 2000-24D2> 44 23 20	ant	dta $44,a(scr)
   117 2003 04 04 04 84 04 04 + 	dta $04,$04,$04,$84,$04,$04,$84,$04,$04,$84,$04,$04,$84,$04,$04,$84
   118 2013 04 04 84 04 04 84 + 	dta $04,$04,$84,$04,$04,$84,$04,$04,$04,$04,$04,$04,$04
   119 2020 41 00 20			dta $41,a(ant)
   120
   121 2023 00 01 02 03 04 05 + scr	ins "sergeantseymour-robotcop.scr"
   122
   123 = 24D3				.ds 0*40
   124
   125 24D3				.ALIGN $0400
   126 2800-498A> 00 00 00 00 + fnt	ins "sergeantseymour-robotcop.fnt"
   127
   128 					ift USESPRITES
   129 					.ALIGN $0800
   130 				pmg	.ds $0300
   131 					ift FADECHR = 0
   132 					SPRITES
   133 					els
   134 					.ds $500
   135 					eif
   136 					eif
   137
   138 4800			main
   139 				; ---	init PMG
   140
   141 					ift USESPRITES
   142 					mva >pmg pmbase		;missiles and players data address
   143 					mva #$03 pmcntl		;enable players and missiles
   144 					eif
   145
   146 4800 A5 14 C5 14 F0 FC		lda:cmp:req $14		;wait 1 frame
   147
   148 4806 78				sei			;stop IRQ interrupts
   149 4807 A9 00 8D 0E D4		mva #$00 nmien		;stop NMI interrupts
   150 480C 8D 00 D4			sta dmactl
   151 480F A9 FE 8D 01 D3		mva #$fe portb		;switch off ROM to get 16k more ram
   152
   153 4814 A9 FF 8D FA FF A9 + 	mwa #NMI $fffa		;new NMI handler
   154
   155 481E A9 00			lda #$00
   156 4820				fxsa FX_XDL_ADR0		; XDLIST PROGRAM ADDRES = $000000
Macro: FXSA [Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.vbx]
     2 4820 A0 41		        ldy     #FX_XDL_ADR0
     3 4822 91 80		        sta     (fxptr),y
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm
   157 4824				fxsa FX_XDL_ADR1
Macro: FXSA [Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.vbx]
     2 4824 A0 42		        ldy     #FX_XDL_ADR1
     3 4826 91 80		        sta     (fxptr),y
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm
   158 4828				fxsa FX_XDL_ADR2
Macro: FXSA [Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.vbx]
     2 4828 A0 43		        ldy     #FX_XDL_ADR2
     3 482A 91 80		        sta     (fxptr),y
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm
   159
   160 482C A9 01			lda #VC_XDL_ENABLED;|VC_XCOLOR
   161 482E				fxsa FX_VIDEO_CONTROL
Macro: FXSA [Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.vbx]
     2 482E A0 40		        ldy     #FX_VIDEO_CONTROL
     3 4830 91 80		        sta     (fxptr),y
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm
   162
   163 4832 A9 C0 8D 0E D4		mva #$c0 nmien		;switch on NMI+DLI again
   164
   165 4837 4C 37 48			jmp *		;CPU is busy here, so no more routines allowed
   166
   167 483A			stop
   168 483A A9 00 8D 1D D0		mva #$00 pmcntl		;PMG disabled
   169 483F AA				tax
   170 4840 9D 00 D0 E8 D0 FA		sta:rne hposp0,x+
   171
   172 4846 A9 FF 8D 01 D3		mva #$ff portb		;ROM switch on
   173 484B A9 40 8D 0E D4		mva #$40 nmien		;only NMI interrupts, DLI disabled
   174 4850 58				cli			;IRQ enabled
   175
   176 4851 60				rts			;return to ... DOS
   177
   178 				; ---	DLI PROGRAM
   179
   180 4852			.local	DLI
   181
   182 = 4852				?old_dli = *
   183
   184 					ift !CHANGES
   185
   186 4852 AD 10 D0		dli1	lda trig0		; FIRE #0
   187 4855 F0 E3			beq stop
   188
   189 4857 AD 11 D0			lda trig1		; FIRE #1
   190 485A F0 DE			beq stop
   191
   192 485C AD 1F D0			lda consol		; START
   193 485F 29 01			and #1
   194 4861 F0 D7			beq stop
   195
   196 4863 AD 0F D2			lda skctl
   197 4866 29 04			and #$04
   198 4868 F0 D0			beq stop
   199
   200 486A AD 0B D4			lda vcount
   201 486D C9 02			cmp #$02
   202 486F D0 E1			bne dli1
   203
   204 4871 8D 0A D4 8D 0A D4 + 	:3 sta wsync
   205
   206 487A				DLINEW DLI.dli2
Macro: DLINEW [Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm]
     1 487A A9 86 8D 05 49		mva <DLI.DLI2 NMI.dliv
     7 487F A5 F7			lda regA
    11 4881 A6 F8			ldx regX
    15 4883 A4 F9			ldy regY
    18 4885 40				rti
    20 = 4886				.def ?old_dli = *
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm
   207 					eif
   208
   209
   210 4886			dli_start
   211
   212 4886			dli2
   213 4886 85 F7			sta regA
   214 4888 A9 2C			lda >fnt+$400*$01
   215 488A 8D 0A D4			sta wsync		;line=40
   216 488D 8D 09 D4			sta chbase
   217 4890				DLINEW dli3 1 0 0
Macro: DLINEW [Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm]
     1 4890 A9 98 8D 05 49		mva <DLI3 NMI.dliv
     7 4895 A5 F7			lda regA
    18 4897 40				rti
    20 = 4898				.def ?old_dli = *
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm
   218
   219 4898			dli3
   220 4898 85 F7			sta regA
   221 489A A9 30			lda >fnt+$400*$02
   222 489C 8D 0A D4			sta wsync		;line=64
   223 489F 8D 09 D4			sta chbase
   224 48A2				DLINEW dli4 1 0 0
Macro: DLINEW [Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm]
     1 48A2 A9 AA 8D 05 49		mva <DLI4 NMI.dliv
     7 48A7 A5 F7			lda regA
    18 48A9 40				rti
    20 = 48AA				.def ?old_dli = *
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm
   225
   226 48AA			dli4
   227 48AA 85 F7			sta regA
   228 48AC A9 34			lda >fnt+$400*$03
   229 48AE 8D 0A D4			sta wsync		;line=88
   230 48B1 8D 09 D4			sta chbase
   231 48B4				DLINEW dli5 1 0 0
Macro: DLINEW [Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm]
     1 48B4 A9 BC 8D 05 49		mva <DLI5 NMI.dliv
     7 48B9 A5 F7			lda regA
    18 48BB 40				rti
    20 = 48BC				.def ?old_dli = *
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm
   232
   233 48BC			dli5
   234 48BC 85 F7			sta regA
   235 48BE A9 38			lda >fnt+$400*$04
   236 48C0 8D 0A D4			sta wsync		;line=112
   237 48C3 8D 09 D4			sta chbase
   238 48C6				DLINEW dli6 1 0 0
Macro: DLINEW [Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm]
     1 48C6 A9 CE 8D 05 49		mva <DLI6 NMI.dliv
     7 48CB A5 F7			lda regA
    18 48CD 40				rti
    20 = 48CE				.def ?old_dli = *
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm
   239
   240 48CE			dli6
   241 48CE 85 F7			sta regA
   242 48D0 A9 3C			lda >fnt+$400*$05
   243 48D2 8D 0A D4			sta wsync		;line=136
   244 48D5 8D 09 D4			sta chbase
   245 48D8				DLINEW dli7 1 0 0
Macro: DLINEW [Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm]
     1 48D8 A9 E0 8D 05 49		mva <DLI7 NMI.dliv
     7 48DD A5 F7			lda regA
    18 48DF 40				rti
    20 = 48E0				.def ?old_dli = *
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm
   246
   247 48E0			dli7
   248 48E0 85 F7			sta regA
   249 48E2 A9 40			lda >fnt+$400*$06
   250 48E4 8D 0A D4			sta wsync		;line=160
   251 48E7 8D 09 D4			sta chbase
   252 48EA				DLINEW dli8 1 0 0
Macro: DLINEW [Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm]
     1 48EA A9 F2 8D 05 49		mva <DLI8 NMI.dliv
     7 48EF A5 F7			lda regA
    18 48F1 40				rti
    20 = 48F2				.def ?old_dli = *
Source: D:\!Delphi\graph2font\___examples\vbxe\sergeantseymour-robotcop.asm
   253
   254 48F2			dli8
   255 48F2 85 F7			sta regA
   256 48F4 A9 44			lda >fnt+$400*$07
   257 48F6 8D 0A D4			sta wsync		;line=184
   258 48F9 8D 09 D4			sta chbase
   259
   260 48FC A5 F7			lda regA
   261 48FE 40				rti
   262
   263 				.endl
   264
   265 				; ---
   266
   267 = 0000			CHANGES = 0
   268 = 0000			FADECHR	= 0
   269
   270 = 007F			SCHR	= 127
   271
   272 				; ---
   273
   274 48FF			.proc	NMI
   275
   276 48FF 2C 0F D4			bit nmist
   277 4902 10 03			bpl VBL
   278
   279 4904 4C 86 48			jmp DLI.dli_start
   280 = 4905			dliv	equ *-2
   281
   282 4907			VBL
   283 4907 85 F7			sta regA
   284 4909 86 F8			stx regX
   285 490B 84 F9			sty regY
   286
   287 490D 8D 0F D4			sta nmist		;reset NMI flag
   288
   289 4910 A9 00 8D 02 D4 A9 + 	mwa #ant dlptr		;ANTIC address program
   290
   291 491A A9 3E 8D 00 D4		mva #@dmactl(standard|dma|lineX1|players|missiles) dmactl	;set new screen width
   292
   293 491F E6 F6			inc cloc		;little timer
   294
   295 				; Initial values
   296
   297 4921 A9 28			lda >fnt+$400*$00
   298 4923 8D 09 D4			sta chbase
   299 4926 A9 00		c0	lda #$00
   300 4928 8D 1A D0			sta colbak
   301 492B 8D 16 D0			sta color0
   302 492E A9 0E		c1	lda #$0E
   303 4930 8D 17 D0			sta color1
   304 4933 A9 00		c2	lda #$00
   305 4935 8D 18 D0			sta color2
   306 4938 8D 19 D0			sta color3
   307 493B A9 02			lda #$02
   308 493D 8D 01 D4			sta chrctl
   309 4940 A9 04			lda #$04
   310 4942 8D 1B D0			sta gtictl
   311 4945 A9 00		x0	lda #$00
   312 4947 8D 00 D0			sta hposp0
   313 494A 8D 01 D0			sta hposp1
   314 494D 8D 02 D0			sta hposp2
   315 4950 8D 03 D0			sta hposp3
   316 4953 8D 04 D0			sta hposm0
   317 4956 8D 05 D0			sta hposm1
   318 4959 8D 06 D0			sta hposm2
   319 495C 8D 07 D0			sta hposm3
   320 495F 8D 08 D0			sta sizep0
   321 4962 8D 09 D0			sta sizep1
   322 4965 8D 0A D0			sta sizep2
   323 4968 8D 0B D0			sta sizep3
   324 496B 8D 0C D0			sta sizem
   325 496E 8D 12 D0			sta colpm0
   326 4971 8D 13 D0			sta colpm1
   327 4974 8D 14 D0			sta colpm2
   328 4977 8D 15 D0			sta colpm3
   329
   330 497A A9 86 8D 05 49 A9 + 	mwa #DLI.dli_start dliv	;set the first address of DLI interrupt
   331
   332 				;this area is for yours routines
   333
   334 4984			quit
   335 4984 A5 F7			lda regA
   336 4986 A6 F8			ldx regX
   337 4988 A4 F9			ldy regY
   338 498A 40				rti
   339
   340 				.endp
   341
   342 				; ---
   343 02E0-02E1> 00 48			run main
   344 				; ---
   345
