+Philsan Posted February 18, 2008 Share Posted February 18, 2008 I would like to change this routine http://www.atariarchives.org/c2bag/page103.php so that players are in single line resolution instead of double line resolution. Can someone help me? Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted February 19, 2008 Share Posted February 19, 2008 559 is the key... change 350 POKE 559,46:POKE 53277,3 into 350 poke 559,62:poke 53277,3 Quote Link to comment Share on other sites More sharing options...
+Philsan Posted February 19, 2008 Author Share Posted February 19, 2008 I already know that I have to add 16 to have single line resolution. The problem is that other things must be changed in the listing, in particular in lines 200-330. Quote Link to comment Share on other sites More sharing options...
Rybags Posted February 19, 2008 Share Posted February 19, 2008 For single-line, the base has to be on a 2K boundary, not 1K. You'll also need to change offsets and counters of 128 to 256. There's also calculations in there with 512, they need to be changed to 1024. 200 A=4*(INT(PEEK(742)/4)-1) That line establishes PMBASE on the 1K boundary below the top of free RAM. So just change the 4s to 8s to align on 2K instead of 1K. Change the -1 to -2 to reserve 2K. Probably more, but you should be able to work it out. That's a kinda dirty way of doing PMGs in BASIC anyway. It's usually better to just move the screen lower in RAM and use the very top of RAM for PMGs - that way they're well protected from the OS or BASIC just overwriting them. Quote Link to comment Share on other sites More sharing options...
+Philsan Posted February 20, 2008 Author Share Posted February 20, 2008 Thanks for your attention, in particular to Rybags. He changed for me Compute's P/M routine to single line resolution and improved it to protect memory. Perhaps this routine (it runs in Atari Basic and Turbo-Basic XL) can be useful for newbies. 5 REM PMSAMPLE1-SINGLE LINE RESOL. 10 DIM PM1$(256),PM2$(256),PM3$(256) 12 MEMTOP=PEEK(740) 14 POKE 106,MEMTOP-16 16 GRAPHICS 15+16 20 SIZE1=16:SIZE2=8 30 DIM SHIP$(SIZE1),ALIEN$(SIZE2) 40 DIM CLEAR$(256) 50 FOR ROWS=1 TO SIZE1 60 READ DOTS 70 SHIP$(ROWS,ROWS)=CHR$(DOTS) 80 NEXT ROWS 90 DATA 0,0,0,0,0 100 DATA 16,56,56,124,108,68 110 DATA 0,0,0,0,0 120 FOR ROWS=1 TO SIZE2 130 READ DOTS 140 ALIEN$(ROWS,ROWS)=CHR$(DOTS) 145 POKE 53248,X0 150 NEXT ROWS 160 DATA 60,126,219,126,36,36,66,129 170 FOR ROWS=1 TO 256 180 CLEAR$(ROWS,ROWS)=CHR$(0) 190 NEXT ROWS 200 A=MEMTOP-8 210 POKE 54279,A 220 VSA=256*PEEK(135)+PEEK(134) 230 BOA=256*PEEK(141)+PEEK(140) 240 PM=256*A+1024 250 DISP=PM-BOA 260 ADD=2 270 FOR T=1 TO 3 280 PMHIGH=INT(DISP/256) 290 PMLOW=DISP-256*PMHIGH 300 POKE VSA+ADD,PMLOW 310 POKE VSA+ADD+1,PMHIGH 320 DISP=DISP+256:ADD=ADD+8 330 NEXT T 340 PM1$=CLEAR$:PM2$=CLEAR$:PM3$=CLEAR$ 350 POKE 559,62:POKE 53277,3 360 COLR1=25:COLR2=11:COLR3=74 370 POKE 704,COLR1:POKE 705,COLR2:POKE 706,COLR3 380 X1=125:X2=75:X3=175 390 POKE 53248,X1:POKE 53249,X2:POKE 53250,X3 400 Y1=95:Y2=65:Y3=65 410 PM1$(Y1)=SHIP$:PM2$(Y2)=ALIEN$:PM3$(Y3)=ALIEN$ 420 IF STICK(0)<8 THEN X1=X1+3 430 IF STICK(0)>8 AND STICK(0)<13 THEN X1=X1-3 440 IF STICK(0)=14 THEN Y1=Y1-3 450 IF STICK(0)=13 THEN Y1=Y1+3 460 POKE 53248,X1:PM1$(Y1)=SHIP$ 470 IF STICK(1)<8 THEN X2=X2+2 480 IF STICK(1)>8 AND STICK(1)<13 THEN X2=X2-2 490 POKE 53249,X2 500 IF STICK(2)<8 THEN X3=X3+2 510 IF STICK(2)>8 AND STICK(2)<13 THEN X3=X3-2 520 POKE 53250,X3 530 GOTO 420 P107L1SL.zip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.