View Single Post
Old 01 April 2018, 17:34   #9
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,625
1. Your code debugs fine in AsmTwo (which is based on AsmOne 1.02). But if you add startup code that clears INTENA, clear all but VERTB and PORTS to be able to debug. Cartridges can debug even with the OS turned off, but you must then put a button wait in the critical places or know the breakpoint address to debug at the right place.

Your code is perfectly valid to show a screen for a while. In an OS environment, the system could refresh the screen and Copper pointer would be reset, and OS interrupts are still running (in fact, all the applications the user has started before yours will pre-emptively multitask with your demo) stealing processing time.

And Lightpen is actually an accurate term for the raster beam, it really draws a picture with light. Whereas one of these is just a sensor that doesn't draw anything.

2. The hardware has no notion of raster positions > $ff; it's 8-bit so it wraps around to 0 after $ff. So instead, you must insert an extra $ffdf,$fffe to show something below this position. Bit of a pain, but if you create a .w variable for the vertical position you can move and bounce that, and then put the lower 8 bits of the position into the copper (and insert the extra wait if necessary).

3. XOR (strangely called EOR on 68k) inverts all bits of the destination that are 1 in the source.
Photon is offline  
 
Page generated in 0.04323 seconds with 11 queries