Jump to content

8bit-Dude

Members
  • Posts

    229
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by 8bit-Dude

  1. 5 hours ago, _The Doctor__ said:

    24k left for all kinds of fun, you can do it!

    No I cannot. This games needs about 10K for the charset/tileset/charmap, about 5K for network code, and so on...
    I was already closed to maxxed out with the current implementation.

     

    I might perhaps try to generate those immediate loads / indirect addressing code blocks when setting the sprite.

  2. Alright, after playing around with this for a while, I now understand how the engine can be so fast.

    Instead of just storing the sprite bytes and transferring them by indirect addressing, it relies on lists of immediate loads (like lda #0) followed by absolute,X stores (like sta $C600+0,x). This saves quite a bunch of cycles when setting the sprites, but..... it takes up a huge load of memory. Especially because the instructions are repeated twice (for PMG 0/1 and 2/3). Each sprite takes up about 6~8 times more memory space.

    I won't be able to use the engine for 8bit-Strike, as I have 112 x 8 x 16 multicolor sprites (that would take about 28K of memory instead of 3.5K currently).

  3. 9 hours ago, MrFish said:

     

    I think this is the more developed version of the multiplexer above. There's a thread about it here (or in the main forum) somewhere; but here are the files.

     

     

     

    Thanks very much Mr. Fish! I will study and see how I could integrate the engine into 8bit-Unity (some rewriting is probably needed, looks like some macros in there are not supported by ca65).

  4. 12 hours ago, mellis said:

    It sounds like you are looking for a general-purpose library (or routine) to handle the sprite multiplexing, but you are going to find that the only general-purpose implementations will lead to the flickering you have now.  A flicker-free multiplexor will need to be designed around your specific game, with clever in-game constraints allowing you to reuse the same players/missiles on different scan lines.   

    The example which I posted (http://atariarea.krap.pl/24h/spritemania/STRSPLXR.COM) is close to what I would like to achieve.
    Are there code snippets out there showing how this wizardy was achieved?

  5. 10 hours ago, TGB1718 said:

    Not sure if this helps, wrote it some time ago just to see how many sprites I could get on screen (64 I think)

    no vertical movement, but same sprite being displayed multiple times on different scan lines.

    All the calculations are done during VBlank processing, so the DLI just picks up the new offsets

    for each sprite. Give it a few seconds to get going and you will see them split.

    This is more or less what I already implemented: re-use of Players in the vertical direction (by updating the XPOS and COLOR on DLI lines).

  6. Hey Guz,

     

    Taking inspiration from https://playermissile.com/dli_tutorial/, I implemented vertical sprite multiplexing in 8bit-Unity last year.

    However the performance is less than ideal in my new game "8bit-Strike". I still get excessive flicker when more than 2 multicolor sprites share the same DLIs.

     

    I have seen some pretty impressive stuff on this forum (Like this: http://atariarea.krap.pl/24h/spritemania/STRSPLXR.COM).So I wonder if anyone could point me in the direction of the "ultimate" sprite multiplexer in 2022? Something that does both horizontal and vertical multiplexing, with minimum use of CPU cycle....

     

    Thanks in advance!

    • Like 1
  7. On 2/28/2022 at 4:39 PM, 42bs said:

    The interrupt code kinda hurts my sizecoder's eyes (redundancy).

    Here my proposal:

     

    Your code caused a compilation error on   beq  @IRQexit1 :   Error: Range error (130 not in [-128..127])

    I fixed it up as follows, which saves 16 bytes from the CC65 version and seems to work correctly:

     

    IRQ:
            lda     INTSET          ; Poll all pending interrupts
            and     #SERIAL_INTERRUPT
    	bne	@doIRQ
    		clc
    		rts
    		
    @doIRQ:	
            bit     TxDone
            bmi     @tx_irq     ; Transmit in progress
    
            ldx     SERDAT
            lda     SERCTL
            and     #RxParityErr|RxOverrun|RxFrameErr|RxBreak
            beq     @rx_irq
            tsb     SerialStat  ; Save error condition
            bit     #RxBreak
            beq     @noBreak
            stz     TxPtrIn     ; Break received - drop buffers
            stz     TxPtrOut
            stz     RxPtrIn
            stz     RxPtrOut
    @noBreak:
            lda     contrl
            ora     #RxIntEnable|ResetErr
            sta     SERCTL
            lda     #$10
            sta     INTRST
            bra     @IRQexit
    @rx_irq:
            lda     contrl
            ora     #RxIntEnable|ResetErr
            sta     SERCTL
            txa
            ldx     RxPtrIn
            sta     RxBuffer,x
            txa
            inx
    
    @cont0:
            cpx     RxPtrOut
            beq     @1
            stx     RxPtrIn
            bra     @IRQexit
    
    @1:
            sta     RxPtrIn
            lda     #$80
            tsb     SerialStat
    @tx_irq:
            ldx     TxPtrOut    ; Has all bytes been sent?
            cpx     TxPtrIn
            beq     @allSent
    
            lda     TxBuffer,x  ; Send next byte
            sta     SERDAT
            inc     TxPtrOut
    
    @exit1:
            lda     #TxIntEnable|ResetErr
            bra     @IRQexit
    
    @allSent:
            lda     SERCTL       ; All bytes sent
            bit     #TxEmpty
            beq     @exit1
            bvs     @exit1
            stz     TxDone
    
            lda     #RxIntEnable|ResetErr
    
    @IRQexit0:
            ora     contrl
            sta     SERCTL
    
    @IRQexit:
            lda     #SERIAL_INTERRUPT
            sta     INTRST
            clc
            rts

     

    • Like 1
  8. In order to make it easier for people to start developping games/code using the 8bit-Hub, I have added a folder on GitHub that contains a small demo code written in CC65.

     

    See GitHub Code: https://github.com/8bit-Dude/8bit-Hub/tree/master/CC65

     

    See Emulation of 8bit-Hub (Firmware 0.6) in Handy 0.98: http://8bit-slicks.com/?wpdmpro=handy

     

    For more info on the 8bit-Hub: http://8bit-unity.com/?page_id=551

     

    Note: This code can be easily ported to assembly. You simply need to use the files hub.s (generated by CC65) and comlynx.s. Then use the same API calls as shown in main.c. ?

     

    8bit-Hub.PNG

    • Like 1
    • Thanks 2
  9. Here is some technical information on how the engine works
    -------------------------------------------------------------------
    The game only requires to create a couple of bitmaps and text file for each screen. For example:

     

    Base bitmap:
    scene01.png

     

    Animation bitmap:
    scene01.png

     

    Script file: scene01.txt

     
    A python script compiles the text and produces a navigation file (together with a summary image)

     

    Navigation summary:
    scene01.png

     

    So it is very easy to get started!

    • Like 2
  10. 5 hours ago, xxl said:

    Excellent application for the ZX0 compressor ?

     

    Indeed! I will make a full disclaimer in the release notes of all the tools/bits of codes that I have integrated, and all the people who are supporting this project!

     

    As a technical note here, it is worth noting that Exomizer is used to compress everything (binaries/bitmaps) except for the Atari XEX files. The way CC65 generates binaries for the Atari means that blocks of memory are re-used several times in a staging process. Exomizer is not able to cope with that.

     

    Happily, Chris (XXL) came to the rescue with a ZX0 decompressor that integrates with xBios. That really makes a big difference with how much data can be packed onto a single disk!

    • Like 3
  11. With the new release of 8bit-Unity 0.5 just around a corner, I am going to post here some news about features.
    To start with, I made a special effort to improve the "point'n'click" tech demo called 8bit-Goblin.
    Here is a list of major improvements:
    - Scripting engine now based on simple "text" files.
    - Added animation paths (motion coordinates and frames).
    - Added new targets: Atari 400/800, and NES/Famicom.
    This updated Tech Demo in 8bit-Unity 0.5 contains everything for you to get writing a point'n'click game!!!
    For more info, check out: http://8bit-unity.com/?page_id=358

    goblin-disks.PNG

    • Like 22
    • Thanks 2
  12. 1 hour ago, Rybags said:

    You can use latches on TRIG though the main purpose is for 1->0 transitions (button pressed)

     

    AFAIK, that's what the Arduino does in Digital Output mode.

     

    I set the state to HIGH / LOW, which should cause the Trigger to transition betwen 1 / 0.

     

    This works fine on 800, 600XL, 130XE, but on the 800XL it takes such as long time that a ldx #255 counter decrements all the way to 0 before the trigger transitions from 1 to 0. It is as if the Atari is fighting against being pulled down on that line...

     

  13. I am getting ready to launch the Atari 8bit cable for my 8bit-Hub (see: http://8bit-unity.com/?page_id=551)

     

    The system connects to Joy Port 2, using PIA for I/O. Rapid toggling of the first pin (falling edge TTL) is required to trigger interrupts on the Arduino.
    I have carried out testing with Filippo on various systems, and found the following:

     

      - NTSC 800 (1 unit): OK
      - PAL 800 (1 unit): OK
      - PAL 600XL (1 unit): OK
      - PAL 800XL (4 units, some modded with U1MB, Sophia2...): ALL NOT OK!
      - NTSC 1200 XL (1 unit): OK
      - PAL 130 XE (2 units): OK

    As you can see above, the PAL 800 XL is the only model giving an issue with TTL edge detection.
    I wonder if there is anything different with the chips used in 800XL PAL region???

    • Like 1
×
×
  • Create New...