Jump to content

jacobus

Members
  • Posts

    781
  • Joined

  • Last visited

Posts posted by jacobus

  1. 16 hours ago, atarialoha said:

    Infocom really started going cheap when they stopped producing the original amazing boxed sets and made those flatpack boxes.

     

    I think they didn't even include the feelies right?

    It wasn't so much a matter of cheapness (the feelies were all included in the grey boxes) so much as outraged retailers who wanted smaller and more conventional packaging.  Can you imagine trying to put the original StarCross saucer on a store shelf?  Never mind the folios that either took up a massive amount of space when displayed face forward, or disappeared completely when shelved sideways.

  2. 26 minutes ago, atarialoha said:

    I have heard Starcross is super difficult?

     

    I might give Infidel a shot, since you rate it so highly. But first I want to try solving Deadline all over again.

     

    The Witness was also the first one I solved.

    I found it quite challenging!  It's one of the only four Infocom games that can fit the entire program and data onto a single side of an Atari disk, so while the game is a bit short, the puzzles more than make up for it.  Also, possibly the first of their games where the Feelies acted as copy protection - you will need the star map to progress past the first few moves.  (feelies are also needed for Infidel - both at the beginning and throughout the game)

  3. Zork I,II,III

    Deadline

    Starcross (with a friend - we spent an entire weekend hammering at it)

    The Witness (the first one I solved)

    Planetfall (my favourite - somewhere I have a printed walkthrough of the entire game)

    Enchanter, Sorcerer, Spellbreaker

    Infidel (a close second favourite)

    Seastalker 

    The Hitchhiker's Guide to the Galaxy (with help (lots) from the Invisiclues)

    Cutthroats

    Hollywood Hijinx

    The Lurking Horror (on the ST)

    ...all back in the day

     

    I played RTZ to about the halfway point, but just couldn't finish - even getting that far was a grind

     

     

    I tried to interest my kids in playing - even the avid readers weren't interested.  Has anyone's offspring enjoyed them?

     

    • Like 1
  4. I'm a little late to the party, but I highly recommend a language called "Quick" from Raindorf Software, now available from DGS.

     

    Basic-like syntax, compiles to fast machine code, gives you access to DLI, VBI, fine scrolling, etc.

     

    (Still a work in progress, but this game is written in Quick) ZombieAttack RC3.xex

     

     

    This DLI example makes the top part of the display appear to fade in by incrementally increasing the brightness of the first 8 scan lines

    INTER DLI1 ;pfield0 A
    LOCAL
     BYTE
     [
      V0,V1,V2,V3
     ]
    BEGIN
     PUSH
     SYNC(1)
     CHBAS=168  ;alt1 charset
     VSCROL=VFS  ;set fs values for top
    
     *set starting colours
     V0=32    ;40   red-orange
     V1=160   ;168  blue grey
     V2=112   ;120  ultramarine
     V3=64    ;72   red
    
     *fade in
     REPEAT
      PFCOL0=V0
      PFCOL1=V1
      PFCOL2=V2
      PFCOL3=V3
      V0+
      V1+
      V2+
      V3+
      SYNC(1)
     UNTIL V0>=40
    
     DLI(DLIFOUT)  ;make next DLI active
     PULL
    ENDDLI

     

  5. On 3/19/2021 at 6:06 PM, Mathy said:

    Hello guys

     

    Eight slots would be very nice.  And if that makes the box too long, just turn it over 90 degrees.  (Yes, that's easier said than done)

     

    Sincerely

     

    Mathy

     

    PS I'm not saying there should be only one version of the 1090.   :D

    Would it be possible to daisy-chain multiple units instead?  Could that be one of the expansion cards?

    • Like 2
  6. On 3/9/2021 at 6:10 PM, Alfred said:

    Found a few more pictures. First shows the two BBS slave machines (under the window) running the Puff BBS. Only the left XL answered the phone, I used the other to rarely chat with people on the BBS. Sticker on that 1050 tells me it's a USD drive. The next shows my original programming setup, circa 1992 I believe. The stack of 1050's didn't get used much since I had the mux. Last two are an early mux setup. The drive on top of the cabinet is a 47MB that I got for the super-low price of $650 back then. Inside the cabinet, the 8" 80MB Quantum drive is still in service, some cheap Adaptec controller on top. I'm not sure, the drive on the floor might be one of the 20MB 8" Quantums that Puff initially gave me, they went out of service when the 80MB arrived. The printer will be a Panasonic 1091, I had retired the Atari 1029 by then. As for the calendar, I had to bring that home from the office. People started complaining about it seeing it hanging on the wall in my cubicle. Heathens.

     

     

    IMG_0004.jpg

     

    Nice setup Alfred!  The amount of dust on that XL suggests it ran for a very long time without intervention.  What was the name of your BBS? (I'm assuming it was local to the GTA)

     

    The Toronto Sun Sunshine girls - the first page of the newspaper anyone ever turned to :-)

     

     

    • Like 1
  7. 1 hour ago, ivop said:

    Could you post your VBI routine, and how it's calling memcopy? And how do you setup the VBI? It might be that registers (AXYP) are not preserved during the interrupt call.

    Sure ? but it's in Quick so may not be much help.  The PUSH/PULL, IPUSH/IPULL, ZPUSH/ZPULL (currently commented out) are supposed to be used to save and restore the CPU registers but the documentation is both confusing and contradictory and I have never quite figured out how to use them properly.  Is this something I can add to the copy routine instead?

     

    INTER VERTBLNK
    LOCAL
     BYTE
     [
      V
     ]
     WORD
     [
      VD,VM
      OP=130,SP
     ]
    BEGIN
    * PUSH
    * IPUSH
    * ZPUSH
    * SP=OP
    
     IF VBENABLE=1
      ZZC=0
      REPEAT
       CALL($00,$00,$00,$4C00)
       ZZC+
      UNTIL ZZC=33
      VBENABLE=0
     ENDIF
    
     *Horizontal Scrolling
     IF SCRLH=1 ;scroll right -->
      IF HFS=9
       IF HCS<16 ;limit of screen
        IF MAPXR<65
         HFS=12
         HCS+
        ENDIF
       ENDIF
      ELSE
       HFS-
      ENDIF
     ENDIF
     IF SCRLH=255 ;scroll left <--
      IF HFS=12
       IF HCS>0
        IF MAPXL>0
         HFS=9
         HCS-
        ENDIF
       ENDIF
      ELSE
       HFS+
      ENDIF
     ENDIF
    
     HSCR00=HCS
     HSCR01=HCS
     HSCR02=HCS
     HSCR03=HCS
     HSCR04=HCS
     HSCR05=HCS
     HSCR06=HCS
     HSCR07=HCS
     HSCR08=HCS
     HSCR09=HCS
     HSCR10=HCS
     HSCR11=HCS
     HSCR12=HCS
     HSCR13=HCS
     HSCR14=HCS
     HSCR15=HCS
     HSCR16=HCS
    
     *vertical scrolling
     IF SCRLV=1 ;top down (plyr moves up)
      IF VFS=0
       IF VCS>0
        IF MAPYT>0
         VSCR00-
         VSCR01-
         VSCR02-
         VSCR03-
         VSCR04-
         VSCR05-
         VSCR06-
         VSCR07-
         VSCR08-
         VSCR09-
         VSCR10-
         VSCR11-
         VSCR12-
         VSCR13-
         VSCR14-
         VSCR15-
         VSCR16-
         VFS=7
         VCS-
        ENDIF
       ENDIF
      ELSE
       VFS-
      ENDIF
     ENDIF
    
     IF SCRLV=255 ;bot up (plyr moves dn)
      IF VFS=7
       IF VCS<16
        IF MAPYB<64
         VSCR00+
         VSCR01+
         VSCR02+
         VSCR03+
         VSCR04+
         VSCR05+
         VSCR06+
         VSCR07+
         VSCR08+
         VSCR09+
         VSCR10+
         VSCR11+
         VSCR12+
         VSCR13+
         VSCR14+
         VSCR15+
         VSCR16+
         VFS=0
         VCS+
        ENDIF
       ENDIF
      ELSE
       VFS+
      ENDIF
     ENDIF
    
     *handle joystick
     IF STICK0<>15
      V=JOYX(STICK0) ;LUT
      ADD(PX,V,PX)
      SCRLH=0 ;no scroll flag
      IF PX<124
       SUB(PX,V,PX)
       SCRLH=255 ;scroll left flag <--
      ENDIF
      IF PX>125
       SUB(PX,V,PX)
       SCRLH=1 ;scroll right flag -->
      ENDIF
    
      V=JOYY(STICK0) ;LUT
      ADD(PY,V,PY)
      SCRLV=0
      IF PY<119
       SUB(PY,V,PY)
       SCRLV=1
      ENDIF
      IF PY>121
       SUB(PY,V,PY)
       SCRLV=255
      ENDIF
    
    
    
     ELSE
      SCRLH=0
      SCRLV=0
     ENDIF
    
    * OP=SP
    * PULL
    * IPULL
    * ZPULL
    ENDVBI

     

  8. 4 hours ago, ivop said:

    Exactly :)  main is just an example of how you call memcopy, i.e. setup src, load dst in AX and size in Y, and call the routine. ($1234 and $5678 are just example source and destination addresses)

     

    @StickJock's code is off by one. It copies bytes 1-56 instead of 0-55. But the unroll is correct and faster. You could add the same trick of having set COPYSOURCE (src in my case) by the caller, and COPYDEST (dst) by the callee, to save space everywhere you call this routine.

     

     

    Thanks for all the help, I am definitely closer!  The code (with some very minor changes) works when called from the main part of the program but fails when run in the VBI.  I should elaborate - it runs properly once when called from the VBI but then locks up the computer.  Do I need to do something different when exiting?

     

    .lsfirst
    
    zplocation		.equ	$CC	;; Uses memory locations starting at this address.
    org			.equ	$4C00	;; Start of main code
    
    src			.equ	zplocation+$0	;; Source
    dst			.equ	zplocation+$2	;; Destination
    bytes			.equ	zplocation+$4	;; Size
    
    		.org	org
    
    ; caller sets src & dst & bytes
    ; Y is size minus 1(!), maximum of 127 (i.e. 128 bytes)
    
    memcopy
    ;	sta dst
    ;	stx dst+1
            ldy bytes
    
    loop
    	lda (src),y
    	sta (dst),y
    	dey
    	bpl loop
    
    	rts
    
    	.end

     

  9. 23 hours ago, StickJock said:

    If you don't care about code size, and you want it as fast as possible, and the source & destination blocks can change every time, then I think that the fastest would be to set up your source & destination addresses in a pair of zero page words, and then use an unrolled-loop of repeated LDA (source),Y ; STA (dest),Y ; DEY

     

    Your subroutine could look something like this:

      Reveal hidden contents

     

    COPY56BYTES:

      LDY #56

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y ; 55

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y ; 50

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

    COPY48BYTESWITHYPRELOADEDWITH48:

      LDA (COPYSOURCE),Y ; 48

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y ; 45

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y ; 40

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y ; 35

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y ; 30

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y ; 25

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y ; 20

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y ;15

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y ; 10

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y ; 5

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      DEY

      LDA (COPYSOURCE),Y

      STA (COPYDEST),Y

      RTS

     

     

     

    After loading your source address in COPYSOURCE and your destination address in COPYDEST, you can call COPY56BYTES to do the copy as fast as possible.

    If you want to copy 48 bytes, then also load Y with 48 and call COPY48BYTESWITHYPRELOADEDWITH48.  If you need some other number of bytes copied, you can add labels in the appropriate place in the unrolled loop and call them (with Y preloaded as appropriate).

    I think that this will give you the fastest memory copy, using 2 + N*(5+6+2) - 2 + 6 cycles, not counting the JSR and the loading of the COPYSOURCE & COPYDEST words.

     

    As for size, this sub will take 2+N*5 bytes.  So, for N=56, it will be 282 bytes long.  If you want the speed, you have to pay for it somewhere else!

     Thank you for this!  Once I get the code working, I'll come back to this for now, I'll go with readability ? 

  10. On 8/10/2020 at 11:44 AM, ivop said:

    Do you cross page boundaries? Can page zero be a source or destination location?

     

    Edit: do source and destination frequently change? Is self-modifying code allowed or might it need to run from ROM? Undocumented (not illegal) instructions, or should it also work on non-stanard machine with a 65C02 and up?

     

    Edit2: tight code, or speed? :)

     

    Edit3: size maximum of 128, 256, or more?

     

    There are so many factors :)

     

    Here's a sample:

    
    src			.equ	zplocation+$0
    dst			.equ	zplocation+$2
    
    ; caller sets src
    ; enter with A lo(dst) and X hi(dst)
    ; Y is size minus 1(!), maximum of 127 (i.e. 128 bytes)
    
    memcopy
    	sta dst
    	stx dst+1
    
    loop
    	lda (src),y
    	sta (dst),y
    	dey
    	bpl loop
    
    	rts
    
    main
    	lda #$34	; lo($1234)
    	sta src
    	lda #$12	; hi($1234)
    	sta src+1
    
    	lda #$78	; lo($5678)
    	ldx #$56	; hi($5678)
    	ldy #55		; 56 bytes
    	jsr memcopy
    
    	rts

     

    I moved storing of dst to the memcopy routine. That saves space at the caller side. No need to sta dst/stx dst+1 everytime you call memcopy.

     

    This could be improved upon a lot, depending on your specific needs :)

    Thank you very much for the reply!

     

    in answer tour questions:

       -I do not cross page bountries

       -zero page is not used as a source or destination

       -source and destination change each time the copy routine will be called

       -rather not have self-modifying code, I may put this in a cart

       -speed is my preference - I need to copy 56 bytes 32 times for a full screen redraw

       -when you say size - do you mean size of code or bytes copied?  Code size is not too important, (under 256 bytes preferred), bytes copied each call is either 48 or 56

     

    Questions

       -I understand the first two routines, but I don't understand why in the main routine at all.  Why the constants ($1234 and $5678)?

     

    thank you!

     

    Edit: Wait a second, do memcopy and loop perform the actual copy and main simply sets up and calls it?

  11. On 7/30/2020 at 6:04 PM, ilmenit said:

    64 bytes fit in one page what can greatly simplify the code. Do you select source or destination location? Is at least one of them constant?

    Both source and destination are variable - the amount of data to copy is always 56 bytes - however I think I'd like to be able to specify that as well just in case I find another use for this code.

  12. Time to make some space!

     

    Reasonable offers considered, I will ship to US and Canada.  If you are interested in a trade, I am looking for the packaging that comes with Synapse's Page 6 utility.

     

    Please read the descriptions beside each item - feel free to ask questions!

     

     

     

    Boxed 1050 in almost new condition.  Tested and working.  All components included.  Box has some brown packing tape attached.  Includes DOS 3 !!! ?

    2116895765_Boxed1050(2).thumb.JPG.b2cd4966dd950a54ec3b81812d83d569.JPG1838210953_Boxed1050(3).thumb.JPG.e34cf91cd519c66cb4b21fa6a0df0948.JPG625632882_Boxed1050(4).thumb.JPG.5e6dd755338a35babf356f61a0668a83.JPG579374180_Boxed1050(5).thumb.JPG.96183713f0280a274a1c4633b8e7aa1d.JPG553688085_Boxed1050(6).thumb.JPG.24a4539b4a6b9a1a663d423be8100c7e.JPG74740129_Boxed1050(7).thumb.JPG.cd7c16cc00509cb9ec6653cfd522cd47.JPG1106428429_Boxed1050(8).thumb.JPG.d4ad7dd21c841372cb2bfd7ca8e6b0d9.JPG1952670773_Boxed1050(9).thumb.JPG.34b8d2c050a155674905c6d0b27c80fe.JPG

     

     

    400 - includes Tara aftermarket keyboard.  Early model - Week 12 of 1981.  Machine powers up but does not boot or display anything.  Parts only!

    1311542005_400-Parts(1).thumb.JPG.cd6af6b707cbe85b054570618827d409.JPG319850595_400-Parts(2).thumb.JPG.a0d279f888560978032d66b8493f4d09.JPG854903598_400-Parts(3).thumb.JPG.43f6fb52706f45a8db3cbec87a16ba03.JPG1436340053_400-Parts(4).thumb.JPG.0420aa316746b4bddde59f91329a8319.JPG

     

     

    48K 800 - Parts only - missing spring from door latch, IO bezel and clear plastic power light carrier.  Small chip in front right corner.

    1189822653_800-Parts(2).thumb.JPG.49340b95ff315cddd97b47a3d6373301.JPG1752748730_800-Parts(3).thumb.JPG.b105af9bd0a33889e94879353282006c.JPG1329707064_800-Parts(5).thumb.JPG.124833ee771bd63b5381086b6640665f.JPG698332053_800-Parts(6).thumb.JPG.9dd3c3c6fcdee00ff99396dfbf3e4656.JPG1384645839_800-Parts(7).thumb.JPG.b6b3bba2950b3d4d7ad6e81dac762d16.JPG835057485_800-Parts(8).thumb.JPG.d2da69f3dbf923ecf827a44c33ae30bb.JPG846145308_800-Parts(1).thumb.JPG.fbd0df94b6226355f4690e9022c45cc7.JPG1024532069_800-Parts(9).thumb.JPG.995e77b7754baea13648e163c52cee5f.JPG

     

     

    810 Drive - powers up, spins but otherwise does not respond.  Small chip on one side.  For parts.

    372557659_810-Parts(1).thumb.JPG.cb821cd650c7413a64068e5529b269e2.JPG2050861236_810-Parts(3).thumb.JPG.b9d493df01fafac34513f3e98d61576f.JPG2091783952_810-Parts(4).thumb.JPG.af93827408cda47801a7acb19c60dc71.JPG1354895343_810-Parts(5).thumb.JPG.780fc5d9b07c91dbeedbfd9def370503.JPG371265457_810-Parts(6).thumb.JPG.49d06567faf96caedf47fb17f9776182.JPG1028954566_810-Parts(7).thumb.JPG.d41ff26e8dbd69facc824f76d57934e0.JPG820482769_810-Parts(8).thumb.JPG.69ea605cb0dfd6f1bdb602437910f2a7.JPG1826433540_810-Parts(9).thumb.JPG.11d1a25b29e60c61088ff56f0a6048b0.JPG

     

     

    2 - 850 interfaces - they power up but otherwise not tested.  One has some fairly significant case damage.

    338601177_850-Parts(1).thumb.JPG.34579c9b5f8dccf2773d5c6d5224e0b5.JPG1518739839_850-Parts(5).thumb.JPG.f297b8c2c3c9628d675cc9b6da22325f.JPG1839420067_850-Parts(6).thumb.JPG.f184f3e795b168c6fab98f3a7f7e69c5.JPG2126043593_850-Parts(7).thumb.JPG.50a46bfab360caee8244547611ff8b30.JPG

     

     

    XEGS #1 - Bad ROM (no basic or Missile command), runs the cartridges I tested with, but no guarantees.  Does not respond to keyboard.

    276367164_XEGS1(2).thumb.JPG.6a039fefc53dd13b99f94dd772591db7.JPG1536626839_XEGS1(3).thumb.JPG.1402318ccd74b8fe2fe5c4a6d0801d4d.JPG1537218669_XEGS1(5).thumb.JPG.081d2b1e5fee280c72d59f48f1f81c3f.JPG1838565559_XEGS1(7).thumb.JPG.029a4e49168ad7c04b371af53e7c3930.JPG

     

     

    XEGS #2 - Tested and working except for sticky console keys (Option works only intermittently)

    1344237432_XEGS2(2).thumb.JPG.16aa55e423f91a9f07ec6e8778b40d88.JPG72994962_XEGS2(3).thumb.JPG.4b357368fdede9532aac96fcd7c783ee.JPG1019754494_XEGS2(4).thumb.JPG.fae7054cd24cfc5f76a657b620e9b55c.JPG1379136623_XEGS2(1).thumb.JPG.13559595d231ea33996ba4e527088a0d.JPG

     

     

    XEGS #3 - Tested and working properly

    1197358437_XEGS3(2).thumb.JPG.af45c6fd92da2edc5bfff439a25c7196.JPG499765165_XEGS3(3).thumb.JPG.bbd8b373d51823a975ae8ffa412ee1fb.JPG1870779445_XEGS3(4).thumb.JPG.e30d2dd0e1aa78a29dbf38e7d3742cf5.JPG1885830738_XEGS3(1).thumb.JPG.668df4622765d449563439e3666a3b74.JPG

    410s - Parts (1).JPG

    410s - Parts (2).JPG

    800 - Parts (4).JPG

    850 - Parts (2).JPG

    850 - Parts (3).JPG

    850 - Parts (4).JPG

    1050 (1).JPG

    1050 (2).JPG

    1050 (3).JPG

    1050 (4).JPG

    1050 (5).JPG

    1050 (6).JPG

    1050 no label (1).JPG

    1050 no label (2).JPG

    1050 no label (3).JPG

    1050 no label (4).JPG

    1050 no label (5).JPG

    1050 no label (6).JPG

    Boxed 65XE - Parts (1).JPG

    Boxed 65XE - Parts (2).JPG

    Boxed 65XE - Parts (3).JPG

    Boxed 65XE - Parts (4).JPG

    Boxed 65XE - Parts (5).JPG

    Boxed 65XE - Parts (6).JPG

    Boxed 65XE - Parts (7).JPG

    Boxed 65XE - Parts (8).JPG

    Boxed 65XE - Parts (9).JPG

    Boxed 1050 (1).JPG

    Boxed 1050 (10).JPG

    XEGS #1 (1).JPG

    XEGS #1 (4).JPG

    XEGS #1 (6).JPG

    XEGS #2 (5).JPG

    XEGS #3 (5).JPG

  13. 6 hours ago, dmsc said:

    Hi!

    Are you trying to convert this routine - that as made to be called from CC65 compiled C code - to an ASM only code?

     

    Then, you should simply remove the usage of "SP" (the C stack) altogether, and assume that ptr1, ptr2 and ptr2 have the parameters:

    
    ;
    ; Ullrich von Bassewitz, 2003-08-20
    ; Performance increase (about 20%) by
    ; Christian Krueger, 2009-09-13
    ;
    
    .lsfirst
    
    ;;
    ;; TASM Macros and Defines
    ;;
    #define lo(work)                (work & $00FF)
    #define hi(work)                ((work & $FF00) >> 8)
    #define bitprefix		.byte $2C
    
    zplocation		.equ	$CC	;; Uses memory locations starting at this address.  Make sure they are not in use by the system or your program.
    org			.equ	$4C00	;; Start of main code
    
    ptr1			.equ	zplocation+$0	;; Source
    ptr2			.equ	zplocation+$2	;; Destination
    ptr3			.equ	zplocation+$4	;; Size
    
    		.org	org
    
    memcpy
            ldy     #0              ; Needs Y = 0
            ldx     ptr3+1          ; Get high byte of n
            beq     L2              ; Jump if zero
    
    L1      	                ; Unrolled to make it faster...
            lda     (ptr1),Y        ; copy a byte
            sta     (ptr2),Y
            iny
            lda     (ptr1),Y        ; copy a byte
            sta     (ptr2),Y
            iny
    
            bne     L1
            inc     ptr1+1
            inc     ptr2+1
            dex                     ; Next 256 byte block
            bne     L1              ; Repeat if any
    
            ; the following section could be 10% faster if we were able to copy
            ; back to front - unfortunately we are forced to copy strict from
            ; low to high since this function is also used for
            ; memmove and blocks could be overlapping!
    L2                              ; assert Y = 0
            ldx     ptr3            ; Get the low byte of n
            beq     done            ; something to copy
    
    L3      lda     (ptr1),Y        ; copy a byte
            sta     (ptr2),Y
            iny
            dex
            bne     L3
    
    done    rts                     ; return
    
    	.end

     

    Have Fun!

     

    Thank you - much appreciated!

     

    Progress!  It now simply hangs the computer instead of crashing Altirra! ?  I think I forgot to mention that this needs to run in the VBI.  Does that change anything?

     

     

  14. I assume this is eye-rollingly simple, but I'll ask anyway ...

     

    I'm trying to modify a general purpose copy routine to use three parameters - a source location, a destination location and the number of bytes to copy.  Can someone please have a look at the attached code and tell me what I am doing wrong?

     

    ;
    ; Ullrich von Bassewitz, 2003-08-20
    ; Performance increase (about 20%) by
    ; Christian Krueger, 2009-09-13
    ;
    ; void* __fastcall__ memcpy (void* dest, const void* src, size_t n);
    ;
    ; NOTE: This function contains entry points for memmove, which will resort
    ; to memcpy for an upwards copy. Don't change this module without looking
    ; at memmove!
    ;
    
    ;        .export         _memcpy, memcpy_upwards, memcpy_getparams
    ;        .import         popax, popptr1
    ;        .importzp       sp, ptr1, ptr2, ptr3
    
    ; ----------------------------------------------------------------------
    ;;
    ;; compiler directives
    ;;
    
    .lsfirst
    
    ;;
    ;; TASM Macros and Defines
    ;;
    #define lo(work)                (work & $00FF)
    #define hi(work)                ((work & $FF00) >> 8)
    #define bitprefix		.byte $2C
    
    zplocation		.equ	$CC	;; Uses memory locations starting at this address.  Make sure they are not in use by the system or your program.
    org			.equ	$4C00	;; Start of main code
    
    sp			.equ	zplocation+$0	;; Source pointer
    ptr1			.equ	zplocation+$2	;; Source
    ptr2			.equ	zplocation+$4	;; Destination
    ptr3			.equ	zplocation+$6	;; Size
    
    popax			.equ	$BA	;; 
    popptr1			.equ	$BB	;; 
    
    		;;
    program_start	;;
    		;;
    
    		.org	org
    
    
    _memcpy
            jsr     memcpy_getparams
     	.export _memcpy
    
    memcpy_upwards                  ; assert Y = 0
            ldx     ptr3+1          ; Get high byte of n
            beq     L2              ; Jump if zero
    
    L1      	                ; Unrolled to make it faster...
            lda     (ptr1),Y        ; copy a byte
            sta     (ptr2),Y
            iny
            lda     (ptr1),Y        ; copy a byte
            sta     (ptr2),Y
            iny
    
            bne     L1
            inc     ptr1+1
            inc     ptr2+1
            dex                     ; Next 256 byte block
            bne     L1              ; Repeat if any
    
            ; the following section could be 10% faster if we were able to copy
            ; back to front - unfortunately we are forced to copy strict from
            ; low to high since this function is also used for
            ; memmove and blocks could be overlapping!
            ; {
    L2                              ; assert Y = 0
            ldx     ptr3            ; Get the low byte of n
            beq     done            ; something to copy
    
    L3      lda     (ptr1),Y        ; copy a byte
            sta     (ptr2),Y
            iny
            dex
            bne     L3
    
            ; }
    
    done    jmp     popax           ; Pop ptr and return as result
    	.export memcpy_upwards 
    
    ; ----------------------------------------------------------------------
    ; Get the parameters from stack as follows:
    ;
    ;       size            --> ptr3
    ;       src             --> ptr1
    ;       dest            --> ptr2
    ;       First argument (dest) will remain on stack and is returned in a/x!
    
    memcpy_getparams                ; IMPORTANT! Function has to leave with Y=0!
            sta     ptr3
            stx     ptr3+1          ; save n to ptr3
    
            jsr     popptr1         ; save src to ptr1
    
                                    ; save dest to ptr2
            iny                     ; Y=0 guaranteed by popptr1, we need '1' here...                        
                                    ; (direct stack access is three cycles faster
                                    ; (total cycle count with return))
            lda     (sp),y
            tax
            stx     ptr2+1          ; save high byte of ptr2
            dey                     ; Y = 0
            lda     (sp),y          ; Get ptr2 low
            sta     ptr2
            rts
    	.export memcpy_getparams
    
    	.end
    
    

    thank you!

    Copy.A65

×
×
  • Create New...