Jump to content



1

Mirrored Playfield in Standard Kernal?


12 replies to this topic

#1 Animan OFFLINE  

Animan

    River Patroller

  • 2,124 posts
  • I'm a guy... I just happen to like Sailor Moon.

Posted Sun Jul 3, 2011 3:28 PM

Is it possible to use a mirrored playfield in the standard kernal? Will it allow me to free up the playfield variables on the right side, since those pixels are basically mirrored from the left pixels? Or do I have to use the six sprite kernal to do this?

#2 SeaGtGruff OFFLINE  

SeaGtGruff

    River Patroller

  • 4,545 posts
  • Location:Georgia, USA

Posted Sun Jul 3, 2011 3:44 PM

View PostAniman, on Sun Jul 3, 2011 3:28 PM, said:

Is it possible to use a mirrored playfield in the standard kernal? Will it allow me to free up the playfield variables on the right side, since those pixels are basically mirrored from the left pixels? Or do I have to use the six sprite kernal to do this?
You'll have to modify the kernel to do that.

Michael

#3 batari OFFLINE  

batari

    )66]U('=I;B$*

  • 6,236 posts
  • begin 644 contest

Posted Sun Jul 10, 2011 3:31 PM

The latest standard kernel does allow for reflected playfields and variables may be freed.

I believe the command needed is "const pfhalfwidth=1"

I don't recall offhand what variables are freed. I'll have to look into that.

#4 batari OFFLINE  

batari

    )66]U('=I;B$*

  • 6,236 posts
  • begin 644 contest

Posted Sun Jul 10, 2011 4:38 PM

OK, I think by default the variables freed are var24-var47, but since this is an undocumented feature, it's probably not well tested. If someone wishes to test and report back, feel free.

Alternatively, I think you can also set pfres higher, up to 24, and get double vertical resolution, and this will use up the remaining "var" variables.

Also, another feature is you can create a 16-wide playfield about the center using "const pfhalfwidth=1" and "const pfcenter=1" which was created to allow block puzzle games (of which a couple have been made.)

#5 SeaGtGruff OFFLINE  

SeaGtGruff

    River Patroller

  • 4,545 posts
  • Location:Georgia, USA

Posted Sun Jul 10, 2011 6:09 PM

I hope RandomTerrain is adding this information to his batari Basic guide! :)

Michael




#6 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,923 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sun Jul 10, 2011 8:27 PM

View PostSeaGtGruff, on Sun Jul 10, 2011 6:09 PM, said:

I hope RandomTerrain is adding this information to his batari Basic guide! :)
So is this only for the new DPC+ beta version of batari Basic or are we talking about the regular version?

#7 batari OFFLINE  

batari

    )66]U('=I;B$*

  • 6,236 posts
  • begin 644 contest

Posted Mon Jul 11, 2011 1:01 AM

This is for the standard kernel.

Before it is documented, it probably needs some testing. If anyone wants to try it out, feel free and report back.

#8 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,923 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Mon Jul 11, 2011 1:48 AM

View Postbatari, on Mon Jul 11, 2011 1:01 AM, said:

This is for the standard kernel.

Before it is documented, it probably needs some testing. If anyone wants to try it out, feel free and report back.
Thanks.

#9 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,923 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Thu Jul 14, 2011 3:01 AM

There seems to be blank lines between each row.

This:

   playfield:
   XXXXXXXXXXXXXXXX
   X..............X
   X..............X
   X..............X
   XXXXXXXXXXXXXXXX
end


Ends up looking like this:


   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

   X              XX              X

   X              XX              X

   X              XX              X

   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX



Here's the .bin file to use with an emulator:

Attached File  pfhalfwidth_test_2011y_07m_14d_0433t.bin   4K   19 downloads


Here's the bB code:

Attached File  pfhalfwidth_test_2011y_07m_14d_0433t.bas   2.21K   19 downloads

#10 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,923 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Thu Jul 14, 2011 7:29 PM

Does anyone know why blank lines are being added?

#11 RevEng OFFLINE  

RevEng

    River Patroller

  • 2,010 posts
  • bit shoveler
  • Location:Canada

Posted Thu Jul 14, 2011 8:17 PM

The playfield command doesn't appear to generate playfield data that's compatible with the new feature - it's still generating 4 bytes of rom data, even though your playfield is 2 bytes wide. From the generated assembly...

PF_data0
 .byte %11111111, %11111111, %00000000, %00000000
 .byte %10000000, %10000000, %00000000, %00000000
 .byte %10000000, %10000000, %00000000, %00000000
 .byte %10000000, %10000000, %00000000, %00000000
 .byte %11111111, %11111111, %00000000, %00000000

...when I remove the right two bytes the data from each line and assemble it, it looks like it should.

#12 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,923 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Thu Jul 14, 2011 8:38 PM

View PostRevEng, on Thu Jul 14, 2011 8:17 PM, said:

The playfield command doesn't appear to generate playfield data that's compatible with the new feature - it's still generating 4 bytes of rom data, even though your playfield is 2 bytes wide. From the generated assembly...
Oh, OK. Thanks.

#13 batari OFFLINE  

batari

    )66]U('=I;B$*

  • 6,236 posts
  • begin 644 contest

Posted Thu Jul 14, 2011 8:50 PM

Did a little work on this and I think it's fixed on my end.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users