User Tools

Site Tools


introduction_to_programming_the_beamracer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
introduction_to_programming_the_beamracer [2020/09/28 00:47] laubzegaintroduction_to_programming_the_beamracer [2021/09/10 01:49] (current) – [Initialization] silverdr
Line 21: Line 21:
  
 In order to maintain a high level of compatibility with existing C64 software, BeamRacer remains hidden on power up, and the computer behaves as if it was not there. That is, register writes are ignored, and reads report the same values as those in a vanilla C64. In order to maintain a high level of compatibility with existing C64 software, BeamRacer remains hidden on power up, and the computer behaves as if it was not there. That is, register writes are ignored, and reads report the same values as those in a vanilla C64.
-It is necessary to perform so-called “register knocking” for the board to reveal its presence. This is achieved by writing a sequence $42, $52  (screen codes for “BR”) to register $D031. To check if the board is indeed there, register $D031 can then be read and compared with “0”.+It is necessary to perform so-called “register knocking” for the board to reveal its presence. This is achieved by writing a sequence $42, $52  (screen codes for “BR”) to register $D031. To check if the board is indeed there, register $D031 can then be read and verifiedValue of $FF means that BeamRacer was NOT activated.((Please note that early revisions of this chapter, and the code snippet below, advocated checking for $00 as an indicator that the BeamRacer was activated. This is now deprecated and may lead to "false negative" results. The inverted logic, i.e. checking that the value is NOT $FF, is currently the recommended method.))
  
 <code  [enable_line_numbers="false"]> <code  [enable_line_numbers="false"]>
Line 34: Line 34:
  STX VREG_CONTROL  STX VREG_CONTROL
  LDX VREG_CONTROL  LDX VREG_CONTROL
- BEQ BEAMRACER_FOUND_AND_ACTIVATED+ INX 
 + BNE BEAMRACER_FOUND_AND_ACTIVATED
  RTS ; sadly, no BeamRacer...  RTS ; sadly, no BeamRacer...
 </code> </code>
Line 67: Line 68:
  LDA #$20  LDA #$20
  STA VREG_ADR0H  STA VREG_ADR0H
- LDA #$01 ; advance LRAM pointer by one on every transfer+ LDA #$01 ; advance LRAM pointer by one after every transfer
  STA VREG_STEP0  STA VREG_STEP0
  LDX #0  LDX #0
introduction_to_programming_the_beamracer.1601279224.txt.gz · Last modified: 2020/09/28 00:47 by laubzega