Jump to content
IGNORED

PlusROM function (online gaming) support for batari Basic


Al_Nafuur

Recommended Posts

Yesterday I modified @Philsan's batari Basic game L.E.M. (Lunar Excursion Module) to send the score online to the PlusCart High Score Club. Therefor I added experimental PlusROM support to batariBasic.

 

PlusROM functions are supported by Gopher2600, Javatari and the PlusCart

 

If someone is interested in making a batari Basic online game, here are the docs:

http://pluscart.firmaplus.de/pico/?PlusROM#batariBasic

 

The batari Basic fork with PlusROM support can be found here:

https://github.com/Al-Nafuur/batari-Basic

 

To add PlusROM functions support to your existing batariBasic installation just replace (or add) these files in your bB includes folder with the ones from the Github fork above:

  • /includes/2600basicfooter.asm
  • /includes/banksw.asm
  • /includes/score_graphics.asm
  • /includes/PlusROM_functions.asm

 

As a better solution these 4 files can be copied to your project folder, so you use them only in the projects where you need/want PlusROM support!

 

 

@RevEng, @batari I can send a pull request, if you want to add PlusROM support to the main batari Basic repository.

  • Like 3
  • Thanks 3
Link to comment
Share on other sites

28 minutes ago, RevEng said:

 

Sure, I took a quick look and it looks like you made the new features assemle-time conditional, which works for me. ?

yes mostly, but unfortunately the size parameter in "/includes/banksw.asm" cannot be made assemble-time conditional..
?

Link to comment
Share on other sites

Attached some example batari Basic code that uses PlusROM functions to load a random 32x32 pixel playfield picture from an internet backend. The binary and backend php code are attached too.

 

This version loads 8 bytes of playfield pixel per request and paints them with the pfpixel command. Before sending a new request the ROM waits 3 frames, so the picture builds up nice and slow.

 

The binary can be run with Gopher2600 or at the javatari here: https://pluscart.firmaplus.de/javatari/index.html

 

PlusCart user can find the binary in the PlusStore folder: "Public ROMs/PlusROMs"

 

PlusROM painter.bas PlusROM painter.bas.bin api.php

  • Thanks 1
Link to comment
Share on other sites

13 hours ago, RevEng said:

Ah, I see. When I get a sec I'll see if that size= stuff can be changed. It dates back to before dasm was good with rom shifting around, but I don't think we need to do it that way anymore.

That would be cool. I already bothered @Omegamatrix, @Thomas Jentzsch and @Andrew Davie to save the 3 bytes (to free the PlusROM hotspots) in the batari Basic bankswitching code for F8/F6/F4

But removing that ";size=" parameter and make it assemble-time conditional would be a much better solution.

 

Link to comment
Share on other sites

17 hours ago, Al_Nafuur said:

Attached some example batari Basic code that uses PlusROM functions to load a random 32x32 pixel playfield picture from an internet backend. The binary and backend php code are attached too.

 

This version loads 8 bytes of playfield pixel per request and paints them with the pfpixel command. Before sending a new request the ROM waits 3 frames, so the picture builds up nice and slow.

 

The binary can be run with Gopher2600 or at the javatari here: https://pluscart.firmaplus.de/javatari/index.html

 

PlusCart user can find the binary in the PlusStore folder: "Public ROMs/PlusROMs"

 

PlusROM painter.bas 2.48 kB · 2 downloads PlusROM painter.bas.bin 8 kB · 4 downloads api.php 1.96 kB · 1 download

Awesome demo example for the api - I will try to implement this for Flashback BASIC (CBS RAM) and SuperCharger BASIC, I think I should be able to recreate the demo using the same stub to picture-fill and test the new commands against! :) 

 

Question - do the following PlusROM hotspots stay the same for the CBS RAM Plus and SuperCharger format memory schemes?  

PlusROM_functions = 1
  WriteToBuffer = $1ff0
  WriteSendBuffer = $1ff1
  ReceiveBuffer = $1ff2
  ReceiveBufferSize = $1ff3
   
  MAC SET_PLUSROM_API ; {1} = path, {2} = domain
  PlusROM_API
  .byte {1}, 0, {2}, 0
  ENDM

 

  • Like 1
Link to comment
Share on other sites

23 minutes ago, Mr SQL said:

Awesome demo example for the api - I will try to implement this for Flashback BASIC (CBS RAM) and SuperCharger BASIC, I think I should be able to recreate the demo using the same stub to picture-fill and test the new commands against! :) 

 

Question - do the following PlusROM hotspots stay the same for the CBS RAM Plus and SuperCharger format memory schemes?  

PlusROM_functions = 1
  WriteToBuffer = $1ff0
  WriteSendBuffer = $1ff1
  ReceiveBuffer = $1ff2
  ReceiveBufferSize = $1ff3
   
  MAC SET_PLUSROM_API ; {1} = path, {2} = domain
  PlusROM_API
  .byte {1}, 0, {2}, 0
  ENDM

 

The PlusROM hotspots in CBS RAM Plus are at the same addresses. In fact these are the PlusROM hotspot addresses for all supported bankswitchings.

 

PlusROM functions for SuperCharger is not yet supported by the PlusCart, but it might be supported in the future.

 

 

  • Like 1
Link to comment
Share on other sites

On 12/8/2020 at 12:55 AM, Al_Nafuur said:

The binary can be run with Gopher2600

 

There is a bug in the current release of Gopher2600 so that this PlusROM binary will not be detected correctly. @JetSetIlly has already found this bug and will hopefully fix it soon.

 

 

Link to comment
Share on other sites

Another batar Basic PlusROM example.

 

"batari maps" is like google maps just with 8 bits ?.

 

The backend serves a 640x331 pixel world map in 32x32 pixel chunks. First tile send by the backend is the center of the country the PlusCart or emulator is requesting from. The map can be traveled with the joystick.

 

PlusCart user can find the binary in the PlusStore folder "/Public ROMs/PlusROMs"

 

The binary can also be run with Gopher2600 or Javatari (Javatari seems to have a bug in the receive buffer, which screws up the map with old data after a few request.)

 

 

batari maps NTSC.bas batari maps PAL60.bas batari maps NTSC.bas.bin batari maps PAL60.bas.bin

Edited by Al_Nafuur
  • Like 2
Link to comment
Share on other sites

  • 5 months 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...