Jump to content

Xuel's Photo

Xuel

Member Since 21 Aug 2008
OFFLINE Last Active Yesterday, 11:57 PM

Posts I've Made

In Topic: Space Invaders (8-bit), no missile sound?

Wed Dec 12, 2018 12:22 AM

Here's a quick hack of my previous hack to add a simple missile sound:

Attached File  inv-add-missile-sound.zip   157.64KB   11 downloads

Not a very faithful rendition of the original sound I'm afraid. If someone can make an instrument in a tracker like RMT or create any kind of program to play the sound, I can try to incorporate it.

In Topic: DLI Help - Thanks!

Thu Nov 22, 2018 11:54 PM

Here's one way to fix it:
 
10 REM ASSEMBLY CODE FROM HTTPS://WWW.ATARIARCHIVES.ORG/ALP/CHAPTER_8.PHP
15 REM SEE LISTING 8.2
20 GRAPHICS 0:POKE 752,1
30 SETCOLOR 1,0,0
40 DL=PEEK(560)+PEEK(561)*256
45 REM READ IN ASSEMBLY CODE
50 FOR I=0 TO 49:READ B:POKE 1536+I,B:NEXT I
60 DATA 72,152,72,172,0,4,185,2,4,141
70 DATA 10,212,141,24,208,238,0,4,173,0
80 DATA 4,205,1,4,144,5,169,0,141,0
90 DATA 4,104,168,104,64
91 DATA 165,20,197,20,240,252,169,192,141,14,212,104,104,104,96
95 REM MODIFY DIPLAY LIST FOR INTERRUPT
100 FOR I=6 TO 27:POKE DL+I,PEEK(DL+I)+128:NEXT I
110 FOR I=2 TO 3:POKE DL+I,PEEK(DL+I)+128:NEXT I
195 REM READ IN BACKGROUND COLOR DATA
200 POKE 1024,0:POKE 1025,24
210 FOR I=0 TO 23:READ B:POKE 1026+I,B:NEXT I
220 DATA 25,20,25,20,25,20,25,20,25,20,25,20
230 DATA 25,20,25,20,25,20,25,20,25,20,25,15
235 REM POINT TO DLI ON PAGE 6 AND ENABLE INTERRUPT
240 POKE 512,0:POKE 513,6
245 X=USR(1571)
250 GOTO 250
 
Result:

Attached File  screenshot.png   887bytes   2 downloads

Line 91 adds a new assembly routine to set NMIEN to $C0 right after a vertical blank. This insures that the first DLI fires at the top of the screen instead of some random line.

Line 50 adds 15 to the loop to account for the extra assembly code.

Line 100 subtracts 2 from the loop to avoid setting the DLI flag on the Jump and Wait for Veritical Blank instruction.

Line 110 adds another loop to set the DLI flag on the last blank line in the top margin and the LMS mode 2 instruction. The final display list looks like this:
 
Altirra> .dumpdlist
  9C20: x2   blank 8
  9C22:      blank.i 8
  9C23:      mode.i 2 @ 9C40
  9C26: x22  mode.i 2
  9C3C:      mode 2
  9C3D:      waitvbl 9C20
Note that the DLI fires on the last line of the lines implied by the modeline. That's why you want to put the first DLI on the last blank line, not the first mode 2 line.

Line 230 uses 15 as the last color to demonstrate that the table is now properly synced to the screen. You can change it back to 20.

Line 240 no longer POKES NMIEN.

Line 245 calls the new assembly routine to set NMIEN=$C0 (192) after the vertical blank.

In Topic: Altirra 3.10 released

Mon Oct 29, 2018 1:22 AM

 

In this version, when I set View -> Overscan mode -> Extended PAL Height, the bottom extended area is rendered as black.

 

Simple test program:

 

Attached File  bg-colors.xex   22bytes   15 downloads

 

3.20-test3:

 

Attached File  screenshot-3.20-test3.png   5.16KB   11 downloads

 

3.20-test1:
 
Attached File  screenshot-3.20-test1.png   5.38KB   9 downloads

In Topic: Altirra Extended BASIC

Wed Oct 17, 2018 3:46 PM

Cool! I found that the PAL version of Cavern10 works both in PAL And NTSC under ATXBasic. It exceeded the frame time under TBXL so I had to make a trimmed down NTSC version. So ATXBasic appears to be faster than TBXL at least in this case.


In Topic: Altirra Extended BASIC

Wed Oct 17, 2018 3:42 PM

Not sure if it's my program behaving badly or a bug in ATXBasic but I'm seeing corruption when typing "LIST". Steps:

  1. ENTER "D2:CAV10AXB.LST
  2. LIST (OK Here)
  3. RUN
  4. Hit RESET
  5. LIST (Some corruption. Several hearts in listing.)
  6. RUN
  7. Hit RESET
  8. LIST (Major corruption)

After step 2:

Attached File  nocorruption.png   8.92KB   14 downloads

After step 5:

Attached File  corruption1.png   10.09KB   13 downloads

After step 8:

Attached File  corruption2.png   9.09KB   12 downloads