Jump to content
IGNORED

Extending the basic kernel to use PF0 (draw left and right walls on the playfield)


Mike_at_AEI

Recommended Posts

The playfield graphics on Batari Basic only seem to use PF1 and PF2 to display playfield pixels.
This leaves 4 rows on both left and right screen that are part of the playfield, but cannot be "drawn" on. 

 

When you design games with walls, you lose a lot of playfield and it just doesn't look good.

I would like to get into the kernel and update it to use the PF0 register so that you can at least draw walls and walls with openings on left and right.  This would at least allow the programmer to set PF0 to %11110000 for the first and last row, and allow PF0 to be changed for the inner rows to %1000000 or %00000000 to build walls left and right.  This woul take 2 more 8 bit variables.

Seems like a relatively simple add.... but I cannot find the standard kernel assembly code anywhere.  Can this be done?  Who do I contact? 

I really think this would be useful for many

Link to comment
Share on other sites

I'm guessing you would have a difficult time finding the kernel time for two more variable reads, and two more register writes. The standard kernel assembly file is called std_kernel.asm and it can be found in the includes subdirectory of your bB installation. If you copy that file to the same directory as the bB source file you want to use it, then it will compile with the local copy instead of the global one, and you won't have to change the global one while you are experimenting with changes to it.

  • Like 2
Link to comment
Share on other sites

You can already use the PF0 pretty well as it is.  In my Game Panic 3 release it's used as an elevator the player can move around with.

https://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#pf0

 

I'd actually rather have a multi sprite kernel that does NOT draw the other half of the playfield.  The would make 3D dungeon crawlers easier to make.  Trying to design screens that must be mirrored can become challenging.

 

gp3astal.thumb.png.5f5fcdc148fc582a32a2df201340b650.png

 

Link to comment
Share on other sites

On 2/11/2023 at 11:58 AM, Karl G said:

I'm guessing you would have a difficult time finding the kernel time for two more variable reads, and two more register writes. The standard kernel assembly file is called std_kernel.asm and it can be found in the includes subdirectory of your bB installation. If you copy that file to the same directory as the bB source file you want to use it, then it will compile with the local copy instead of the global one, and you won't have to change the global one while you are experimenting with changes to it.

Thanks.  I will try...
What I want to do is put a border around the full screen, not lose 8 columns like today.
The minimum I need is to selectively use PFO to draw %11110000 at the top and bottom rows, then allow %1000000 on left, right or both in all middle rows.  I could do this with 4 bits: Draw_Top, Draw_Bottom, Draw_Left, Draw_Right.  If I added four more bits (1 full Byte) then these next four bit would set how many playfield rows will be reflectively drawn on the left or right or both..e.g a setting of %10100100 would draw 4 rows from the top and bottom on the left side as well as the first row on both sides: like this...

XXXX[PF1 and PF2 settings]XXXX
X

X

X

X

 

 

 

X

X

X

X

XXXX[PF1 and PF2 settings]XXXX

Link to comment
Share on other sites

  • 3 weeks later...
On 2/17/2023 at 3:03 AM, KevKelley said:

I had made a border in my game Lawn Boy. Is something like this what you are looking to do?

I loaded your game...very cool concept....maybe close to what I was looking for?  Not sure.  I want to use the whole play field and have doorways into screen left right top and bottom.
Its no problem for top and bottom, but left and right need to use PF0..while batari basic only gives control to PF1 and PF2, thus you are missing 8 playfield columns, 4 on each side. 
Are you using PF0 to draw the sides and top edges of the screen?
I'll need to dig into your code..

  • Like 1
Link to comment
Share on other sites

17 hours ago, Mike_at_AEI said:

I loaded your game...very cool concept....maybe close to what I was looking for?  Not sure.  I want to use the whole play field and have doorways into screen left right top and bottom.
Its no problem for top and bottom, but left and right need to use PF0..while batari basic only gives control to PF1 and PF2, thus you are missing 8 playfield columns, 4 on each side. 
Are you using PF0 to draw the sides and top edges of the screen?
I'll need to dig into your code..

It has been a while since I worked this game but I think I used PF0 for the sides and I remember having an issue with the top line being a different color. I think it had something to do with my kernel settings using of colors and then doing something like setting the COLUPF or COLUBK in addition to each line. It was some weird combo if I am right and my solution was make a border which I liked as it combined with the color behind the score. 

Link to comment
Share on other sites

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...