Jump to content

Wrathchild

Members
  • Content Count

    2,924
  • Joined

  • Last visited

Posts posted by Wrathchild


  1. 8 minutes ago, phaeron said:

    will bypass a fast E:/S: handler

    Indeed, and as the OP's intent (by jumping direct into the O/S) appeared to be to use the OS's routines, choosing to go with obtaining from the OS device table.

    Whether that would still place nice with other handlers present is an exercise for others :D 


  2. 1 hour ago, kenjennings said:

    Is (was) the table guaranteed to stay there?

    I had included an image of that area in my original post but removed it (hence the edit).

     

    I'd considered that as maybe less sure if any other startup code running before and closing or opening things would maybe alter the $34x location.

    Additionally, xxl is using the S: GET routine without that having been opened and hence not present in that area to perform the same obtaining of the address, hence my decision not to opt for this.

     

    From the OS listings I'd consider that table fixed and others (e.g. Altirra OS, MyIDE) would have followed this and not relocated it, but there maybe others that don't.

     


  3. @xxlNo real excuse for jumping directly into the OS these days?

     

    The $F2B0 routine in the XL OS is reflected in the Vector table at $E400 (so the E: PUT is at $E406), but stored as EOUTCH-1.

    Similarly SGETCH-1 is found at $E414.

     

    image.png.a9ddd53533507735c7350df12cb48caf.png

     

    So during initialisation this can be inserted (incremented) into a replacement JMP which is called instead. E.g.

    InitOutCh:
     CLC
     LDA $E406
     ADC #1
     STA VecOutCh+1
     LDA $E407
     ADC #0
     STA VecOutCh+2
     RTS
    
    VecOutCh:
     JMP $FFFF

    Then this should allow your programs to work OK on other OS's. E.g. for OS/B

     

    image.png.23a4356d1b99ffdfd40468e0bfe3d547.png

     

    image.png.a5487f29943a71683089cd9608c923c5.png

     

     

    • Like 4

  4. No he's not, the loop draws at xpos of I and then waits and then erases at I and then I is incremented, then repeat.

    The pause is in-between the draw and erase and so only one ship is view, he just considered about a trail (which would occur if you incremented I before the erase and then draw at the same I)

     

    As others have already covered, the slowness of the plot function is more than likely causing either screen tearing or flicking (e.g. if the time to erase & draw is exceeding 1 frame)


  5. You will be fine adding the option '-O' (capital o) to your cl65 command to enable the optimizer.

     

    As an exercise for you, compile the C to assembler without optimizing, copy the '.s' generated aside, then repeat with '-O' and compare the two, e.g.

    cl65 -t atari -S -Wl "-D__RESERVED_MEMORY__=1" --static-locals autodata.c
    ren autodata.s autodata1.s
    cl65 -t atari -S -O -Wl "-D__RESERVED_MEMORY__=1" --static-locals autodata.c
    ren autodata.s autodata2.s

    [Edit] Thinking about it, you can just use the -o (output) in the command line:

     

    cl65 -t atari -S -Wl "-D__RESERVED_MEMORY__=1" --static-locals -o autodata1.s autodata.c
    cl65 -t atari -S -O -Wl "-D__RESERVED_MEMORY__=1" --static-locals -o autodata2.s autodata.c
    

     

    image.thumb.png.81b4687664c2b65222198ae38e499635.png


  6. 3 hours ago, Nojeee said:

    Happy days

    Thanks for those memories, I did something not to dissimilar. Whilst at Uni I had a 1040STE and the MadMac assembler and could send code from the ST's printer port to my 800XL's joystick ports.
    Between the Atari and C64 was not as neat though as I used a single cable to transfer nibbles but had to hand type the 64 side into a Replay cartridge's monitor in hex 😜

    • Haha 1

  7. 9 minutes ago, antrykot said:

    A couple of examples

    Please excuse a nag, but I would recommend using 'xex' as the extension for any binaries you produce as 'com' has long since been less used due to a main proportion of people downloading to a PC where that extension has its own association.


  8. 3 minutes ago, Irgendwer said:

    cl65 V2.18

    I have cl65 V2.17 - Git 5c8854f

     

    I'm not sure what the behaviour, say with gcc is, but I think the use of -D is just to pass to the pre-processor?

     

    If you've edited the atari.cfg to non-zero then because the define isn't passed to the linker then it would use that and so work in your case?

×
×
  • Create New...