Jump to content
IGNORED

WIP- Space Taxi


Just Jeff

Recommended Posts

@Thomas Jentzsch

 

Thanks!  That does look a lot more versatile.  One thing that is unclear to me is- can you combine these?  Its said that its a "combination", but to be clear, I could have?:

 

  D7 D6 D5D4D3D2D1D0
  0  0   x x x x x x   switch a 1K ROM bank xxxxxx to $F000
  0  1                 switch a 512 byte RAM bank xxxxxx to $F400 with write @ $F600
  1  0                 switch a 512 byte RAM bank xxxxxx to $F800 with write @ $FA00
  1  1                 switch a 1K ROM bank xxxxxx to $FC00

 

And that once I write the banks to $3E and $3F one time, these segments stay there and stick together and act as one single 4K space until I write to one of them again?

 

Using the above arrangement, I envision something like:

 

$F000   VBLANK and Overscan

$F400   Customized kernel bands assembled in order in RAM

$F800   Unpacked Voice Data (Bytes split in half, left nibbles moved to right nibbles of next byte)

$FC00  Compressed voice sample currently being accessed

 

This is possible?

 

 

Edited by Just Jeff
Link to comment
Share on other sites

1 hour ago, Just Jeff said:

@Thomas Jentzsch

 

Thanks!  That does look a lot more versatile.  One thing that is unclear to me is- can you combine these?  Its said that its a "combination", but to be clear, I could have?:

 

  D7 D6 D5D4D3D2D1D0
  0  0   x x x x x x   switch a 1K ROM bank xxxxxx to $F000
  0  1                 switch a 512 byte RAM bank xxxxxx to $F400 with write @ $F600
  1  0                 switch a 512 byte RAM bank xxxxxx to $F800 with write @ $FA00
  1  1                 switch a 1K ROM bank xxxxxx to $FC00

Yes, that works. You are completely flexible here.

1 hour ago, Just Jeff said:

And that once I write the banks to $3E and $3F one time, these segments stay there and stick together and act as one single 4K space until I write to one of them again?

Yup. You just have consider that the RAM write addresses are offset by $200 from the read addresses.

1 hour ago, Just Jeff said:

Using the above arrangement, I envision something like:

 

$F000   VBLANK and Overscan

$F400   Customized kernel bands assembled in order in RAM

$F800   Unpacked Voice Data (Bytes split in half, left nibbles moved to right nibbles of next byte)

$FC00  Compressed voice sample currently being accessed

 

This is possible?

Yes, you can arrange them as you like.

 

And, while code most likely will not work in a different segment as it was assembled for, data usually can go into any segment.

  • Thanks 1
Link to comment
Share on other sites

Awesome!  I did not occur to me that code will not work in different segments but I suppose that's not a big issue.  In fact I think the arrangement I suggested would work that way.  

 

Why won't code run in deferent segments?  Program counter I suppose?

 

Could you please point me to some example code?- like maybe a small shell that is set up with the RORGs and macros, etc  Or is it easy to just set up myself?

 

Oh and..  This will all work on Stella, PlusCart, Harmony, as well as actual cartridges I assume?

 

Thanks again!

 

-Jeff

Link to comment
Share on other sites

29 minutes ago, Just Jeff said:

Why won't code run in deferent segments?  Program counter I suppose?

Exactly.

29 minutes ago, Just Jeff said:

Could you please point me to some example code?- like maybe a small shell that is set up with the RORGs and macros, etc  Or is it easy to just set up myself?

I have to check my hard drive. Else @Andrew Davie might be able to help.

29 minutes ago, Just Jeff said:

Oh and..  This will all work on Stella, PlusCart, Harmony, as well as actual cartridges I assume?

Stella for sure and PlusCart too. I think Harmony will work, but AFAIK you need a custom file (maybe @batari has something prepared?). Actual cards should be no problem too.

Edited by Thomas Jentzsch
Link to comment
Share on other sites

  • 4 weeks later...

Good afternoon..  Wondering if anyone has a solution to this..

 

.bin attached, though the dashboard is not working properly..

 

I've been working crashing with death plummet (which is largely done- try it), number of lives, game over etc.  But I did get hung up on trying to change the bottom half of the dashboard so it displays number of taxis remaining and am giving up on it unless someone knows how to fit it in.  If you do, please let me know:

 

I split up a 48 bit display so it is a 8-32-8 bit display seen below.  Seemed like it wouldn't be too complicated but I can't seem to be able to get it to work.  No combination of VDELS, preloads, x-register, etc seems to be able to get it past the fact that you have two copies of the same player on each end and it makes VDEL more trouble than help. (in this case P0, P0, P1, P0, P1, P1.)

 

image.thumb.png.5b86f6f25c15c3ff7aeabf556b217bb1.png

 

Note: I have some complicated loads, but there's probably a way around that if necessary..

 

;preloads

      ;lda (PadPtr1),y   ;5 5 Taxis remaining
      ;sta GRP1          ;3
      ;lda (PadPtr4),y   ;5 5 100s and 10s
      ;ora (PadPtr5),y   ;5 5 Combine the 100s and the 10s 
      ;sta GRP0          ;3 8

.kernelLoop2                  ;Bottom half of the dashboard
      sta WSYNC         ;3 0
      lda (PadPtr1),y   ;5 5 Taxis remaining
      sta GRP1          ;3 8
      lda (PadPtr4),y   ;5 13 100s and 10s
      ora (PadPtr5),y   ;5 18 Combine the 100s and the 10s 
      sta GRP0          ;3 21
      lda (Sprite1),y   ;5 26 Dollar-digit
      sta GRP1          ;3 29
      lda (Sprite1+2),y ;5 34 Pennies
      ora (Sprite1+4),y ;5 39
      sta GRP0          ;3 42 After 41 
      lda (Sprite1+6),y ;4 46 Ones-decmal
      sta GRP1          ;3 49
      lda (PadPtr2),y   ;5 54 Duplicate Taxis remaining for now
      sta GRP0          ;3 57

      dey               ;2 59

      ;cpy #0            ;2 61
      bpl .kernelLoop2  ;2/3 63/64

 

Thanks!

-Jeff

 

SpaceTaxi.asm.bin

Edited by Just Jeff
  • Like 4
Link to comment
Share on other sites

New .bin attached

 

Alright..  I settled on reducing the display down to 8 and 32 and I suppose I'll use missiles for something on the other side of the score.  The number of taxis remaining is now displayed and a basic game over state now exists.  If you crash 3 times the game ends and you'll see "The End" Displayed ("Game Over" wouldn't fit).  To start a new game you can hit the reset switch or the fire button for the other joystick (f key in Stella).  Enjoy!

 

image.thumb.png.8348b37196648edd349faba7c3012489.png

 

 

 

SpaceTaxi.asm.bin

  • Like 6
Link to comment
Share on other sites

22 hours ago, Just Jeff said:

Alright..  I settled on reducing the display down to 8 and 32 and I suppose I'll use missiles for something on the other side of the score.

 

I took a look yesterday, but didn't have any luck modifying the 48 pixel kernel for the 8-32-8 layout.

 

Missiles might let you do something - and with your layout you can easily hide the extra missile copies behind the playfield.

 

image.thumb.png.e8bcfc9261a36287a0573703645b2fa9.png

 

 

How much RAM and ROM do you have available?  Perhaps storing pre-merged graphics to ZP RAM and using an unrolled kernel would help pull off 8-32-8.  Your digit graphics appear to be 5* scanlines tall, so would need 30 bytes of ZP RAM.

 

 

* I'm assuming that : in the last box is not really one of your characters

  • Like 1
Link to comment
Share on other sites

1 hour ago, SpiceWare said:

Perhaps storing pre-merged graphics to ZP RAM and using an unrolled kernel would help pull off 8-32-8.

 

Source

8_32_8.zip

 

ROM

8_32_8.bin

 

The kernel is defined in a macro:

 

        MAC STATUS
.Line   SET {1}
        sta WSYNC
        lda Left + .Line
        sta GRP0
        lda Middle1 + .Line
        sta GRP1
        lda Middle0 + .Line
        ldx Middle2 + .Line
        ldy Middle3 + .Line
        SLEEP 19
        sta GRP0
        stx.w GRP0
        sty GRP1
        lda Right + .Line
        sta GRP1
        ENDM

 

Then used to generate the 5 scanlines of output like this:

 

        STATUS 0
        STATUS 1
        STATUS 2
        STATUS 3
        STATUS 4
        sta WSYNC
        lda #0
        sta GRP1
        sta GRP0
        sta GRP1

 

 

Use the left difficult switch to toggle between digits and test pattern which is used to make sure timing is correct.

8_32_8_1.thumb.png.0aaa4b8c00c2c46587f8b6a3c5302d57.png

 

8_32_8.thumb.png.5f1b22ffec97edf23965ecf57eedc882.png

 

If I change the stx.w GRP0 to stx GRP0 then the last pixel of the 2nd copy of GRP0  contains graphics meant for the 3rd copy of GRP0:

 

8_32_8_2.thumb.png.6909c8609efe2ebbf6719735a5d4eef9.png


 

 

  • Like 1
Link to comment
Share on other sites

A few comments:

 

VDEL is not used.

 

This was left over from my initial test with the 48 pixel kernel routines:

        lda #0
        sta GRP1
        sta GRP0
        sta GRP1

 

It should just be this since VDEL isn't used:

        lda #0
        sta GRP0
        sta GRP1

 

 

There's free cycles in the kernel, so you don't have to pre-merge all the graphics into ZP RAM.

 

 

This comment:

; position players to 48 & 72 and prep for 2-4-2 layout

 

should really be this:

; position players to 48 & 72 and prep for 1-4-1 layout

 

 

or 8-32-8 depending if you wish to refer to players or pixels.

  • Like 1
Link to comment
Share on other sites

4 hours ago, SpiceWare said:

Then used to generate the 5 scanlines of output like this:

 

        STATUS 0
        STATUS 1
        STATUS 2
        STATUS 3
        STATUS 4
        sta WSYNC
        lda #0
        sta GRP1
        sta GRP0
        sta GRP1

 

 

 

Just got to thinking I used right-side up graphics and your digit graphics are upside down. For that you'll need to start at 4 and go down:

 

        STATUS 4
        STATUS 3
        STATUS 2
        STATUS 1
        STATUS 0
        sta WSYNC
        lda #0
        sta GRP0
        sta GRP1

 

 

8_32_8.asm.zip

  • Like 1
Link to comment
Share on other sites

Thanks!  That certainly works and I'd love to add all those cycles too.  I have the RAM and ROM, but there is another timing issue.  Prepping the 30 bytes makes the dashboard fat.  It looks like this adds 210 cycles- right? A short while back I put some effort into doing the opposite- undid pre-merging RAM and adding those ORAs in the score area.  So, I need to revisit that and see where I can gain those cycles or accept the thicker dashboard.  Maybe a combo of the two like you said.  Maybe convert the loop to 5 separate lines, ldy immediate load on each line for the index. I might be able to get away with pre-merging only one of the characters.

 

I also wonder what I would put in that right space..

 

Thanks again!

-Jeff

  • Like 1
Link to comment
Share on other sites

Is the 30 bytes of RAM dedicated to that part of the display, or is it reused during other sections of code?

 

If dedicated then you have a number of options such as doing the pre-merging during OS(overscan), VB(vertical blank), or even spreading the merging over a number of frames.

 

If reused then hopefully the hybrid approach of only pre-merging some of them will work.

 

Could also do a hybrid approach of some pre-merged during OS or VB into dedicated RAM and the rest pre-merged during the dashboard into reused RAM.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

OK Thanks Darrell!..  The unrolled kernel seems to be key.  I think maybe I can use that with no RAM maybe.

 

I pushed the dashboard aside for a bit while I figured some other stuff out.  I decided to add a center pad on the screen, knowing it would force me to think through a lot of other things- which it did.  I had taken some shortcuts which at this point were roadblocks.

 

So at this point:

The passenger knows where the taxi is when on the pad and walks to or from it instead of wandering.

The first 3 screen layouts vary in design, and the number of trips varies as well, and the tables are there to change all the screens eventually.

Screen 1 has a decorative feature and a name!

 

Note: on the attached .bin, screen 2 has 2 pad #1s.  So if the passenger calls for pad #3, its the pad at the bottom of the screen. Also, I made the game unwinnable just for fun- temporarily.

 

image.thumb.png.72996fb71a14840509f3b31055a139ac.png

 

That's all for now

SpaceTaxi.asm.bin

Edited by Just Jeff
  • Like 6
Link to comment
Share on other sites

  • 3 weeks later...

OK Here's the latest .bin..  I've split out the passenger bands from the pad bands so I'm not rewriting them every time.  Made an off-center rhombus and a cloud.  I also created some more pad bands from the "Teleports" screen.  These pads are really straight-forward so I'm going to use them as placeholders to build remaining screens' logic (but not graphics.)  Also notice I'm planning on building "The Beach" in reverse due to early HMOVE limitations.

 

image.thumb.png.8e80ab791d1cbe4aa15953d5c364fa11.png  image.thumb.png.bc1a7b4d6988f4a2ad2b6fe75b722656.png

SpaceTaxi.asm.bin

  • Like 8
  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...