8-Bit Software Online Conversion

Seasick Mode Split Demo - Listing

10MODE1 20DIM MEM 500,S%(256),U%(256) 25oldirq=!&204 AND&FFFF 30FORO=0TO2 STEP2:P%=MEM 40[OPT O 50.irq1 BIT&FE4D:BMIvia1:BIT&FE6D:BMI via2:.exit JMPoldirq 60.via1 LDA&FE4D:AND#2:BEQexit:TXA:PH A:TYA:PHA:JSRint1:PLA:TAY:PLA:TAX:JMPexi t 70.via2 LDA&FE6D:AND#&40:BEQexit:LDA& FE64:TXA:PHA:TYA:PHA:JSRint23:PLA:TAY:PL A:TAX:JMPexit 80.int1 LDA&FE6B:AND#&3F:ORA#&40:STA& FE6B:LDA#&E0:STA&FE64:LDA#&8:STA&FE65:LD A#&C0:STA&FE66:LDA#&20:STA&FE67 85LDA#&C0:STA&FE6D:STA&FE6E 86LDA#&18:STA&FE45 90LDA#13:STA&FE00:LDA&A00:STA&FE01 100LDA#12:STA&FE00:LDA&A01:STA&FE01 110LDA#5:STA&FE00:LDA&A40:STA&FE01:LDA #24:SEC:SBC&A40:STA&A41 120LDA&248:AND#1:ORA#&D8:STA&248:STA&F E20 122LDA#8:STA&FE00:LDA#&0:STA&FE01 130LDA#&FE:STA&70:RTS 140.int23 INC&70:BMIint2:BEQint3:LDA#& 40:STA&FE6E:RTS 150.int2 LDA#9:STA&FE00:LDA#7:STA&FE01 160LDA#5:STA&FE00:LDA&A41:STA&FE01 170LDA#4:STA&FE00:LDA#15:STA&FE01 180LDA#6:STA&FE00:LDA#16:STA&FE01 190LDA#7:STA&FE00:LDA#20:STA&FE01 200½ MOVED TO 225 210RTS 220.int3 LDA#9:STA&FE00:STA&FE01 225LDA#13:STA&FE00:LDA&A10:STA&FE01:LD A#12:STA&FE00:LDA&A11:STA&FE01 230LDA&248:AND#1:ORA#&5A:STA&248:STA&F E20 232LDA#8:STA&FE00:LDA#&A0:STA&FE01 240LDA#4:STA&FE00:LDA#15:STA&FE01 250LDA#6:STA&FE00:LDA#12:STA&FE01 260LDA#7:STA&FE00:LDA#14:STA&FE01 270LDA#&40:STA&FE6E:RTS 280.init SEI 282LDA#0:STA&FE00:LDA#0:STA&FE01:LDX#& 5B:STX&FE20 283LDX#50:.DE DEX:BNEDE:LDX&FE44:STA&F E00:LDA#127:STA&FE01:LDA#&5B:STA&FE20:LD A#&4B:STA&FE20:LDA&0:NOP:LDA#&5B:STA&FE2 0 284LDA#irq1 MOD256:STA&204:LDA#irq1 DI V256:STA&205 285LDA#&FE:STA&FE44:LDA#&26:STA&FE45 287LDA#2:STA&FE00:LDA#101:STA&FE01 290LDA#12:STA&FE40:LDA#13:STA&FE40:CLI :RTS 300] 310NEXT 320!&A00=&B00:!&A10=&2000 325?&A40=20:?&A41=4:U%=0 330CALLinit 335VDU19,0,7,0,0,0,19,2,2,0,0,0,19,3,4 ,0,0,0 336*FX16 338PROCs(&3C00,"If you see this, press BREAK and re-run program.") 340FORN%=0TO100:GCOL0,RND(4):DRAWRND(1 279),RND(511):NEXT 345PRINTTAB(10,23)"MODE 1" 346PROCs(&3C01,"Testing the MODE 7 hal f of the screen") 350PROCcols 351PROCs(&3C51,"!""#$%&'()*+,-./012345 6789:;<=>?@"):PROCs(&3CA1,"ABCDEFGHIJKLM NOPQRSTUVWXYZ[½]^`"):PROCs(&3CF1,"£abcde fghijklmnopqrstuvwxyz¼|¾~"+CHR$127) 353PROCs(&3D41," C O L O U R S  355PROCs(&3DE1,CHR$141+" USE CURSOR KE YS TO MOVE SCREEN"):PROCs(&3E31,CHR$141+ " USE CURSOR KEYS TO MOVE SCREEN") 360X%=0:REPEAT:X%=(X%+(INKEY-122-INKEY -26)*(1-INKEY-1)+&500)MOD&500:U%=(U%+(IN KEY-42-INKEY-58)*(1-INKEY-1))AND127:!&A0 0=(X%+U%DIV8*80+&500)MOD&500+&B00 365?&A40=20-(U%AND7) 367*FX19 370UNTILINKEY(-74) 380FORY%=0TO128:S%(Y%)=(40*SIN(Y%/64*P I)+80*8+80*INT(COS(Y%/64*PI)*8))MOD&500+ &B28:U%(Y%)=20-(INT(COS(Y%/64*PI)*64)AND 7):!&A00=S%(Y%):?&A40=U%(Y%):*FX19 390NEXT 392X%=&3C1 395FORY%=0TO1E9:!&A00=S%(Y%AND&7F):?&A 40=U%(Y%AND&7F):*FX19 396!((X%AND&3FF)+&3C00)=RND(96)+31:!&A 10=(X%-955 AND&3FF)+&2000:X%=X%+2:NEXT 400END 500DEFPROCs(X%,A$):LOCALN%:FORN%=1TOLE NA$:X%?(N%*2-2)=ASCMID$(A$,N%):NEXT:ENDP ROC 510DEFPROCcols:RESTORE600:LOCALN%,D%:F ORN%=8TO0 STEP-1:READD%:PROCbox(N%,D%):N EXT:ENDPROC 520DEFPROCbox(N%,D%):LOCALX%:FORX%=&58 00 TO&7FFF STEP640:X%!(N%*8)=D%:X%!(N%*8 +4)=D%:X%!(632-N%*8)=D%:X%!(636-N%*8)=D% :NEXT 530FORX%=0TO639 STEP8:X%!(&5800+N%DIV2 *640+(N%AND1)*4)=D%:X%!(&7D84-N%DIV2*640 -(N%AND1)*4)=D%:NEXT:ENDPROC 600DATA&A050A05,&A050A050,&AA55AA55,&A 55AA55A,&FAF5FAF5,&5FAF5FAF,&F0F0F0F0,&0 F0F0F0F,&FFFFFFFF