Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Open Source - Create Multiplayer Online Games for 8 and 16 bits consoles

Reply to topic
Author Message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Open Source - Create Multiplayer Online Games for 8 and 16 bits consoles
Post Posted: Tue Sep 20, 2022 11:58 am
Last edited by ruibjr on Tue Sep 20, 2022 2:33 pm; edited 1 time in total
Hi guys, Rui here.

We have been working on something I think you guys will like.
It’s called NET80’s.

It is an online multiplayer platform for 8bit and 16bit consoles.
It allows one to connect to a server and play against (or colab) with up to 7 other people.

Of course, it only works with games that are deigned to connect to a multiplayer online server.
So, we are writing a sample mini-game called Mars Deathmatch.

The best thing is: it’s all open-source.
You can download the source-code for the demo mini-game, the firmware for the communication board, even the code for the game server.

NET80s allows players to play online multiplayer (up to 8 player per room) using their real consoles: SEGA Master System, NES, Mega Drive/Genesis, Super Ni****do and Atari.
Other consoles and 8bit/16bit computers can be added, by using the provided open-source as a starting point.

Right now, we have a demo game, which we are still developing.
It allows multiple players over the internet, and implements really cool shadow mechanics - objects and players that are behind a building (relative to the player) are covered by the building’s shadow (totally or partially).
The source code for the game, including the shadow mechanics, communication with the game server, sprites and tile map are all open-source.

Source-code is currently available to Z80, but we are also going to create a 6502 version, as well as a 68000 and others.

Now, Andre, Rod, Marcelo and I are planning to focus on the game and the game server, so we can deliver the best experience to all players.

So, we would like to invite everyone to support us on Patreon:
You will have access to all source-code, PCB designs, etc.
And you will also have access to our Discord channel, where you will have direct access to us, o you can ask specific questions about the hardware, the firmware, the game code and the server code.

https://www.patreon.com/net80s

You can also check our blog at:

https://www.net80s.com

We are working on the game server right now - release dates are listed in our blog.

We are also working on the demo mini-game - but we welcome everyone to write their own games (which they will be able to sell on the platform).
Cheers!

Andre
Marcelo
Rod
Rui
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3763
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Tue Sep 20, 2022 1:24 pm
well, I have tons of questions but I'll start with just two:
- where will be the game ROM stored? it says 'download games' but then it means you have to save them somewhere... a file onto some device like the Master EverDrive?
- what's the ping round time in your tests?
  View user's profile Send private message Visit poster's website
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Tue Sep 20, 2022 2:23 pm
Hi sverx,

The source-code is already available, so anyone can assemble it and burn it into a cartridge.
It is also available as a BIN file.

We are using an Ever Drive for the SMS and for the Mega Drive/Genesis.

The communications lib is very small and can easily be easily copied to your own code.

The comminication with the server is pretty straightforward: you just call RCV_FRAME.
It takes 12 ms for the round trip to the game server.

The communication interface is a small box that plugs into the second controller.
It is based on an ESP32 board, which contains Bluetooth and Wifi.
The board is very inexpensive - you can buy it at an electronics store, or online, and upload the interface code into it.

We are going to offer the asembled NET80's board, as well as pre-assembled cartridges in the future, in IndieGoGo, but one can build it right now - no need to purchase the preassembled versions.

The current RCV_FRAME logic is pretty simple:

The console sends 8 bytes to the server, which collects the info form all the consoles (up to 8) that are connected to the same game room and sends back the 64 bytes.
So, the actual "meaning" of the info is defined by the game code.
In the mini demo game (Mars Deathmatch), it is the x and y position, direction (0 = right, 1 = left) and 1 bit to indicate wether each playr is moving or not.
We are going to add more flags, as we develop the game: fire, weapon type, etc.

One can use thi simple server protocol, but it is also run game code on the server (javascript) - it is only limited by the ammount of info it can receive (8 bytes from each player, 64 bytes tops to all players).

We are going to upload more information as we move forwared.

Cheers!
  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Tue Sep 20, 2022 2:43 pm
BTW, in the blog you can watch the main video, which shows two players, one in a computer and the other one on a real console, so you can have a better idea of the communication speed and lag, etc.

The game loop runs as 12FPS - not because of the communication, but because of the shadow mechanics, which is pretty heavy and uses lots of trig tables, etc.

Cheers!
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3763
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Wed Sep 21, 2022 8:15 am
ruibjr wrote
It takes 12 ms for the round trip to the game server.


it's pretty fast indeed but very close to the duration of a whole frame (16.6 ms at 60Hz) and I wonder if that figure is a best case scenario or simply the average delay
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14688
  • Location: London
Reply with quote
Post Posted: Wed Sep 21, 2022 9:17 am
Any networked game like this has to deal with latency above a frame length, for example by predicting the movement of remote players and correcting that prediction when data arrives; or even rewinding time and replaying inputs when data arrives. The game engine therefore has to be fast enough to be able to do this without stutter. Alternatively you can just make the gameplay synchronous - for example by making it turn-based.

Another approach is to make the game mainly run on a server, which helps to stop cheaters in the wider world of online gaming. The “clients” run their local version of the game while sending inputs to the server and adjusting their reality according to what the server says. However you will still get worse and worse results as latency goes up.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 3763
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Wed Sep 21, 2022 10:09 am
If I understood correctly, the game runs on the actual console so that's why I was asking about those details. To have the same game running on both consoles, connected through the Internet and have the remote console just sending the other player input over the net requires very VERY low latency and I suspect we're not low enough in this case... the consoles will get out of sync pretty easily.

If on the other hand the game runs on a server, the console acts as a rendering hardware and this seems not to be what they had planned.

But this is my 2 cents, and I probably didn't understand everything correctly.
  View user's profile Send private message Visit poster's website
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Wed Sep 21, 2022 11:03 am
Hi guys,

The game developer can chooe to run the game logic either on the console itself, or on the server - in JavaScript.

The 12ms is pretty good, actually, comparable to any good modern console.
How did we achie this? By using an ESP32 to connect to the server.
The ESP32 is a really fast chip, and achieves almost-instant communication with the server.

The latency between the console and the ESP32 itself is 830 microseconds.

So, NET80s can deliver a pretty decent 30FPS rate, like many, many of the old games from back then.

Also, the default server logic works like this:

* Collect data from all the clients (8 bytes per client)
* Pack all the info in 64 bytes
* Send he 64 bytes to all clients in that game room

We use websockets from the server to the ESP32 clients, so it's pretty fast - a fast as possible.

So, all the console has to do (regarding the multiplayer), on every frame, is:

* Send the game info (8 bytes - actual meaning of the bytes is determined by the game; in Masr Deathmatch, it is the X and Y coordinates, plus a few flags)
* Receive the info pack (64 bytes) returned by the server - this takes 830 us

The mini demo game, which is open-source, outputs 12 FPS, but the "low" speed is not due to the communication. It is due to the complex handling of the shadows (lots of trig tables, plus z-sorting, etc).

But, even at 12 FPS, it's pretty playable, as you can see in the videos.

Anyone can add the multiplayer funcionality to their games.
Just copy and paste the communications library and call it once per frame and your game is now multiplayer.

The player info is synchronized by the server, so all clients are always on the same page.

BUT, if one wants to run some of the game logic on the server, NET80s lets them manage player positions, health bars, etc on the server side.
Still, we have rules for what can be done on the server side.
NET80's won't accept any graphic or sound to be executed on the server, to keep people from writing games that runn on the server and use the consoles as glorified tv output.

We are very strict about what code can be run on the server - as described in our blog.

The only advanced thing we will allow to be executed on the server is AI - we're curious about how powerful AI could allow for the creatin of incredible games. Think naturla language, for instance (a text adventure where you can use atural language? Running on a SMS? Wow! That would be awesome).

Anyway, we're here to help with anything you need.
It's all open source, so, you can start writting your next game or mini-game with online multiplayer, from scratch.
(or add multiplayer to your current games)

NET80's allows up to 8 players per room.
EXCEPT on th Atari VCS 2600 - we're not sure it would be able to handle more than 4 (or even 3) simultaneous players.

Cheers!
  View user's profile Send private message
  • Joined: 23 Jan 2010
  • Posts: 417
Reply with quote
Post Posted: Wed Sep 21, 2022 11:51 am
@ruibjr explain more about server. The developer can build a game can run in SMS and NES. Would be possible a SMS player and a NES player both in same server each one in themselves consoles? For example, the mini-game demo can run with a cooperation between NES and SMS players? And this server, how the players will use it. It is a free server? And the box ESP32 with DB9 plug. Would be sold? or your team will built a schematic for the players wire its freely ?
  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Wed Sep 21, 2022 12:07 pm
Hi segarule,

Yes, each game room allows up to 8 players.
And each player can be running the game on a diferent console.
One of them, on an SMS, two others on NES's, another one on a MegaDrive/Genesis, two on Super Nintendos, etc.

The only real limitation is when one of the players is on an Atari 2600.
This will limit the maximum numebrof players in the room to 3 or 4 - too early to tell which (3 or 4).

Each console, of course, will have to run its own version of the game.
We're working on Mars DeathMatch for the SMS, and will write a MegaDrive version for it when we finish this one.
But, source code is open-source, so anyone can start writing their own version for their favorite console (or 8 bit computer).

Minigames will be free.
We're going to charge US$ 3,00 per month for users to play full versions of the games.
BUT, every backer on Patreon will have it as a reward, for as long as they back NET80s.

Game developers will be able to sell their games on NET80's, we will do the processing and keep 30% - like a Steam for 8 bit/16 bit.
But developers can sell their games outsite of the platform.
If they choose to sell it on the platform, we will allow user to purchase the download version (to run on an ever drive, for instance) or the physical cartridge (shipping will be handled by the deeloper).

The electric dyagram for the ESP32 board is already available for Patreon backers at the lowest tier (U$ 4,00 per month) - so is the PCB layout, the firmware, etc.

The ESP32 board (we call it The NET80's Box) plugs into the second controller port (DB9 on the SMS and MD/Genesis and the Atari, and respective connector types for all other consoles).

Anyone can build their own NET80's box.
The complete source-code even for the Mars Deathmatch game (Z80 assembly, 5k+ lines) is on our Discord Channel.

And, if you really are interested in writing a game or mini game for the NET80's platform, let us know and we will build a NET80's box for you - but, please, only ask if you are really, really... really going to write a game. Really :)

Let us know if you have more questions.

Cheers!
P.S.: Games and mini games will also be available for free - no subscription needed, as long as the game developer makes the game available for free, as well.
  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Wed Sep 21, 2022 12:09 pm
BTW: NET80's will allow different conoles to play on the same game room.
So, our motto should be "We give a new meaning to 'Console Wars'" ;)

Cheers!
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3763
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Wed Sep 21, 2022 3:30 pm
...so you're technically offloading the game logic to the server and keeping only the input and visuals parts on the actual consoles.

I mean, imagine a basic Pong clone. The player controllers will provide the positions for the bats, the server will handle the ball position and direction and speed in the field and handle collisions with walls and bats, and keep the status of each player's bat position. Then it will inform every player of every status change, likely at each frame.

But at the same time I guess there should be some way to have the actual game logic run on a console and have the other(s) just kept in sync like you would do with some Gear-to-Gear cable - of course here the latency could be a big problem but maybe in a few years we'll have 1ms lag Internet and we won't worry...
  View user's profile Send private message Visit poster's website
  • Joined: 06 Mar 2022
  • Posts: 598
  • Location: London, UK
Reply with quote
Post Posted: Wed Sep 21, 2022 3:55 pm
Sounded to me like the ethos of the thing is not to have the game logic on the server, but I think that is quite challenging, as your pong example illustrates very neatly @sverx, since any multiplayer game relies on some kind of state synchronisation between otherwise independent processing parties, so either one party or other must be the single source of truth for state (doubling transfer latency of the state or deltas) or else it does need to be handled centrally on the server.

For more complicated games than pong I can see how you can offload more logic to the individual parties but of course the more complex the global game state is the more bandwidth you need to transfer it.

It's a really intriguing idea though, and well done @ruibjr & co. for getting it off the ground! Would love to do a collaboration at some point. I'd offer to help test but I'm so busy with my project in the short term that I know I'll not be able to be useful for a while. Will maybe check back in with you in a month or so...

(EDIT: I realise there is another alternative to synchronising the state, i.e. to build identical state processors on all parties, start with a baseline state and send identical events to all parties. You would need the state processors to be pure functions - i.e. no RNGs etc., total reliability of receipt on all parties and potentially some tight timing constraints depending on the game)
  View user's profile Send private message Visit poster's website
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Wed Sep 21, 2022 4:18 pm
That's the perfect examle, @sverx.

If I was going to write a multiplayer pong (and I hope one of you guys will ;) ), that's exactly how I would do it.

But it's up to the game developer to choose whether game state is on the server or on one of the consoles, or if each console has a copy of the game state.

In the specific case of the demo minigame, "Mars Deathmatch", we're doing it as described by @willbriton: each console keeps a complete copy of the game state.

When I move my player, I see it move imeediatelly on the screen - then I send my position, animation frame, etc to the server.
The server, then, collects the state of each player and sends to all players, every frame.

Of course, player states may be delayed, but players of CS, PUB-G, Unreal Tournament know it's "part of the game" (pun intended).
Like, who here never got upset when they had the other guy right on their crosshair and whet they pulled the trigger, the guy was miraculously a couple of feet away :)

Also, turn based games and RPG's don't relly so much on synchronization between all players.

Now, for games like pong, or soccer, os basketball, etc, where the playability relies heavily on the synchronization of an NPC item (ball, etc), yes, the best way to approach it is to hadle all player states on the server.

Cheers!
  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Wed Sep 21, 2022 4:22 pm
But, still, only game state can be handled by the server.

NET8's will not accept any game code that render graphics or sound on the server side.

If NET80's was available back then, it would probbably run at least part of the game state on the server - possibly all NPC's, I think.

Also, @willbritton, it would be great if you joined us during the test phase.
We can provide you with a couple ofNET80's boxes.

Our timetable is on the blog (https://www.net80s.com).

Cheers!
  View user's profile Send private message
  • Joined: 25 Jul 2007
  • Posts: 716
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Wed Sep 21, 2022 10:40 pm
Nice project, congrats on getting it this far!

I guess I'll throw in my 2 cents having experimented a lot with netplay on the Game Gear both in real hardware (using ESP32) and in emulation.

Latency is definitely a significant issue to overcome, even in the best-case scenario of two emulated instances over a local loopback the overhead of the TCP/IP stack was enough to desync most games on the Game Gear, however in saying that, they were never designed with netplay in mind and if the game code were designed to handle that I see no reason it couldn't work well (as you have demonstrated with the NET80).

I'll use Columns as an example of a game that works well over netplay, the data transmitted is very sparse. The game state is only transmitted during the initial setup (level difficulty, player height), but once the gameplay starts the two instances run independently of each other and only ever transmit data once a player places a block, or to notify the other player that they lost.

For a more complex game that relies on updates per frame, as long as there is logic to handle stale or invalid data gracefully it should work fine.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3763
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Thu Sep 22, 2022 9:00 am
As I suspect it shouldn't be too hard to have the APIs wrapped in C, anyone wanting that could try coding a game with devkitSMS using this device... even just a simple 2-players Pong clone, or something totally different.
  View user's profile Send private message Visit poster's website
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Thu Sep 22, 2022 10:50 am
@thatawesomeguy, we ue https:// for the website itself - home page, login, handshaking, etc. https:// really is pretty slow. besides, there's the ping time which makes things even worse.

But, once the conselo entrers a game room, we switch to wss:// (websockets).
WebSockets is an always-on protocoll, which means once the connection is upgraded from https:// to wss://, it stays alive for as long as the client is connected. This removes the problem with the ping time. Also, websockets are built on top of udp, instead of tcp, so communication is really fast.

@svrex that would be awesome.
The only reason we are doing "Mars Deathmatch" in pure ASM, is because it uses lots of trig functions, plus unrolled loops and hand-optimized maths like z-sorting, etc.

We regret that we haven't chosen a simpler game - and done it 1most 100% in C (the only part of the code that HAS to be in assembly is the communication subroutine, because tming is critical while communication with the ESP32, through joystick port #2.

If you, or anyone here would like to try writing a minigame or minidemo, we can provide you with all the required source-code, etc.
You don't event need a physical NET80s box.
We have created a modified version of the Miracle SMS Emulator, which emulates the NET80s box, on topo of the original emulation.

Of course, it is much more fun to play it on the actual hardware.
To do this, one can buy an ESP32 board and wire a joystick cable to it - and use an EverDrive - or burn an EPROM.

I will as Andre to pos the model of the ESP32 board we are using - these are pretty inexpensive and can be found anywhere.
You're going to have to sacrifie a controller, though at least its cable.

Cheers!
  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Thu Sep 22, 2022 11:05 am
We're going to post the source code to the communication library here, today.

Andre is going to post the schematics and other tech specs, as well.

The comm subroutine (RCV_FRAME) is pretty simple.

There's an 8 byte output buffer, which holds the data to be sent to the server.
There's a 64 byte input buffer, where the data received from the server is stored.
And there's an extra 1 byte, which tells the console what it's index number is, i.e., its 'player number', 0 means this console is the first console in the room, 1 means it is the second one, etc.

The actual meaning of each byte in both buffers is determined by the game itself - the server collects the individual data and dispatches the full 64 buffer to all clients.

If one wants, they can write javascript code to run any simple game logic process on the received bytes and modify the output data according to game rules, physics, etc.
As a matter of fact, the js code can do any thing - but any pre-rendering of image or sound will disqualify the game, so please keep js limited to controlling NPC's and simple physics/position/velocity control.

Cheers!
  View user's profile Send private message
  • Joined: 21 Sep 2022
  • Posts: 7
  • Location: Brasil
Reply with quote
ESP32 and Cable adpter
Post Posted: Thu Sep 22, 2022 11:23 am
Hi everyone, here is Andre, soo net80s is based inESP32 doit Devkit Wroon 32d and we used cable adapter for maybe don't sacrifice our controllers..
54BE085A-D916-4438-BDA8-685D51191DF2.jpeg (115.99 KB)
ESP32 doit Devkit Wroon 32d
54BE085A-D916-4438-BDA8-685D51191DF2.jpeg

  View user's profile Send private message Visit poster's website
  • Joined: 21 Sep 2022
  • Posts: 7
  • Location: Brasil
Reply with quote
Prototype with oled display
Post Posted: Thu Sep 22, 2022 11:29 am
The prototype with oled display to see Wi-Fi conection and signal.

  View user's profile Send private message Visit poster's website
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Thu Sep 22, 2022 11:31 am
The OLED display is not needed.
We used it for debugging purposes only. We kept it there, in case we need to add new features to the board.
The OLED is inexpensive, but not really necessary.

There are many other options for the ESP32 board - this one just happens to be the one we are using. But durind development of the firt couple of prototypes we have used different boards, and they worked perfectly fine - ESP32 boards are pretty standard.

Just make sure when you purchase the ESP32 board, that it has WiFi and Bluetooth - we currently don't use the bluetooth in the board, but this may be an option in the future.

Cheers!
  View user's profile Send private message
  • Joined: 29 Mar 2012
  • Posts: 879
  • Location: Spain
Reply with quote
Post Posted: Thu Sep 22, 2022 11:48 am
I can try to do a minigame using devkitsms, at least to test it, and we can decide if we want to work further on it if you like it.

Btw, my group is releasing soon a Megadrive game that uses netplay for the penalty shootout (using Megawifi). Maybe we can do a Master system version...

https://www.napegames.com/product/03-1985-world-cup-mega-drive-genesis/
  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Thu Sep 22, 2022 11:53 am
Hi @kusfo.

Perfect!

We can provide you guys with everything you need to add NET80's to you net games.

I'll post the comm library and the timing diagram here, today, so you can write a 68k version of the comm function.

We *are* going to releas a 68k version of RCV_FRAME in the future, but right now we are focused on Mars Deathmatch for the Z80 (SNES).

Cheers!
  View user's profile Send private message
  • Joined: 23 Jan 2010
  • Posts: 417
Reply with quote
Post Posted: Thu Sep 22, 2022 12:03 pm
kazeifa wrote
The prototype with oled display to see Wi-Fi conection and signal.

What is connected in other side of esp32? A PC or Power supply? This board couldnt is connected directly to console?
Supondo que você é brasileiro vamos para as perguntas em português:
O outro lado da placa está ligado a quê? É apenas uma fonte ou está ligado a um PC? Já que a saída da placa é um db9 fêmea, não poderia ser ligada direto ao console, sem a necessidade do cabo de extensão? Eu estou supondo que a conexão ao servidor será via o jogo que está no console, certo? Parabéns pelo projeto. Congratulations.
  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Thu Sep 22, 2022 12:11 pm
Here's the communication code: RCVFRAME, SENDBYTE and a few more lines of Z80 ASM code (game specific, so you can remove them).

I'm also including the timing diagram, so you can easily adapt it to the 68K - fortunatelly, the joystick pinout on the MD/Genesis is the same as in the SMS.

We will provide a better, clean version of the code on our Discord.
Also, the full source-code to the demo game is there.

Someone could get the source-code to Mars Deathmatch and write a new game, using it as a starting point.
The code that generates and paints the shadows over the map is pretty cool.
We're not a game developer, so, if anyone would like to writ their own Mars Deathmatch, feel free to do it :)



Cheers!
comm_z80.asm (3.22 KB)

  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Thu Sep 22, 2022 12:14 pm
[/img]
  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Thu Sep 22, 2022 12:18 pm
Last edited by ruibjr on Thu Sep 22, 2022 12:31 pm; edited 1 time in total
@segarule, the other side is connected to a usb charger.

We could have used the console's own power supply.

But since this is going to be connected to a number of different consoles we thought it wold be better not to draw any current from the consoles to feed the NET80's box.

Some of these consoles are pretty rare and are getting ery expensive.
So, we are using an external power supply for the ESP32.

You can use any sartphone charger, teh ESP32 accepts almost anything you throw at it :)

Cheers!
  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Thu Sep 22, 2022 12:24 pm
If you build your own NET80s box, you can use the 5V that is suplied in the db9 connector.

But, still, we have a real SMS here, which was difficult to find and was pretty expensive.

In other words, we can easily replace an USB charger or an ESP32 board, but finding real hardware that accepts real cartridges is geting pretty difficult (and expensive).


Cheers!
  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Thu Sep 22, 2022 2:31 pm
We're going to post a simple manual here, so you guys can get familiar with how the communication works.

The manual will include pseudo-code that can easily be converted to c.

Also, it's important to note that the communication between the server and the ESP32 is always: send 8 byte to the server then get 64 from from the server.
But, the communication between the console and the ESP32 can use smaller data packets.
For instance, in a pong game, you woul only send the paddle y position, a single byte, and would receive just a few bytes: both paddle y positions, the ball's x and y positions and two more bytes for the score and time, for instance.
So, the console would spend even less time communicating with the ESP32.

Cheers!
  View user's profile Send private message
  • Joined: 03 Mar 2022
  • Posts: 55
Reply with quote
Post Posted: Thu Sep 22, 2022 5:46 pm
Cool! If there's interest, I think it should be quite easy porting the API to work with my MegaWiFi cartridges, that in case you don't know, are Megadrive carts with WiFi capabilities built in (API documentation is here: https://doragasu.github.io/mw-api/doc/html/index.html).
  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Thu Sep 22, 2022 5:57 pm
Hi @doragasu,

The NET80's API connect to game port # 2 of the console.

You can check if NET80's is present, by resetting the TH pin and waiting for TL to go down, then bring TH to high and wait for TL to go hi.

If it does, this means NET80's is present.
If not, then NET80's is not present.

If you run this code, you will provide a callback option for your users.
The game can call your API, and your API decides whether or not to use NET80's, based on the result of this test.

Cheers!
  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Thu Sep 22, 2022 5:59 pm
Hi again, @doragasu,

You can also impemtent a communiation API with our server, so the games that use MegaWifi can connect to the NET80's server without the need to use the NET80's box.

So, player and game developpers can use either.

After all, our goal is not to sell NT80s' boxes.
As long as your hardware connects to our srver and is compatible with our protocols, you're good to go.

Cheers!
  View user's profile Send private message
  • Joined: 03 Mar 2022
  • Posts: 55
Reply with quote
Post Posted: Thu Sep 22, 2022 7:33 pm
Yeah, that's what I was talking about, porting your protocol so it can also run in my carts. Thanks for releasing this as open source and allowing its usage by other devs!
  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Thu Sep 22, 2022 8:03 pm
@doragasu,

We're going to post the protocol here, so you can implement the API protocols.

But, so that you can already start thinking about the features you wnt to add to your board, the server allows you to:

* login, by providing username and password
* logout
* enter room, by providing room id
* exit room
* identify console type (the console you're connecting from)
* find room, by providing search string and search options (by room name, by username, by game, by number of min/ma connected players)
* create room by providing room name and game
* lock room, by providing list of users who can find your room
all of these are done in plain http/https.

Plus:

* send game state to server (up to 8 bytes)
* get game state from server (up to 64 bytes)
these are done in ws/wss (websockets, .g. socket.io).

Cheers!
  View user's profile Send private message
  • Joined: 21 Sep 2022
  • Posts: 7
  • Location: Brasil
Reply with quote
Kazeifa
Post Posted: Fri Sep 23, 2022 1:11 am
We are also working on a simplified version of the api manual, which we are going to post here.
first_attempt.png (46.37 KB)
first_attempt.png

  View user's profile Send private message Visit poster's website
  • Joined: 21 Sep 2022
  • Posts: 7
  • Location: Brasil
Reply with quote
Post Posted: Fri Sep 23, 2022 1:15 am
More...

  View user's profile Send private message Visit poster's website
  • Joined: 21 Sep 2022
  • Posts: 7
  • Location: Brasil
Reply with quote
Post Posted: Fri Sep 23, 2022 1:17 am
more

  View user's profile Send private message Visit poster's website
  • Joined: 29 Mar 2012
  • Posts: 879
  • Location: Spain
Reply with quote
Post Posted: Fri Sep 23, 2022 9:13 am
ruibjr wrote
Hi @kusfo.

Perfect!

We can provide you guys with everything you need to add NET80's to you net games.

I'll post the comm library and the timing diagram here, today, so you can write a 68k version of the comm function.

We *are* going to releas a 68k version of RCV_FRAME in the future, but right now we are focused on Mars Deathmatch for the Z80 (SNES).

Cheers!


Hi!
I don't think we'll adapt World Cup, as the cartridges are already done and packed :_) , but maybe in a future version / improvement!

I'll take a look at the code for trying to do some test for the SMS!
  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Fri Sep 23, 2022 10:45 am
@kusfo, ok, cool.

We're working on a simple manual, so you can start testing the platform.

Andre is going to post the source file to the PCB here, so you can build it.

But, we're also going to modify the online emulator, so you will be able to test your new games on the browser, before building the NET80's boxes.

Cheers!
  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Fri Sep 23, 2022 8:09 pm
Hi everyone.

Here's a simplified manual for the NET80's communications protocol.

It contains an overview of the high-level navigation (login/logout/the hall/game room search/etc).

It also explains how the communication loops work between the console and the NET80's box, and between the ESP32 and the NET80's server.

It includes the actual Z80 ASM communication source code used in the mini demo game for the SEGA Master System ("Mars Deathmatch").

BTW: Mars Deathmatch has a super cool real time shadows with z-sorting for a top view 2d game, which you can use to write your own games.

We're going to update this simplified manual, as you guys as more questions and as we create new versions of the communication library for other consoles.

Cheers!
P.S.: Andre is goig to post the gerber files for the NET80's box, tonight.

  View user's profile Send private message
  • Joined: 21 Sep 2022
  • Posts: 7
  • Location: Brasil
Reply with quote
Post Posted: Sat Sep 24, 2022 11:05 am
Gerber files to make your own PCB
NET80'S V1.1.zip (1.23 MB)

  View user's profile Send private message Visit poster's website
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Mon Sep 26, 2022 7:46 pm
Hi, folks.

We are working on an early-version of the server, which is going to be available to anyone who would like to start playing with the online multiplayer libraries.

If you are interested, please drop us a message and we will create an user for you.

Your user will allow you to upload/delete code to up to 8 game rooms.
You will also be able to 1-click launch your code on up to 8 users for each game room.

We will provide you with an username and password - you will be able to change your password when you log in.

The browser launcher is based on a modified version of the Miracle Emulator (online SMS emulator) - hout out to the creators!

We can also help teams who have developed other emulators/ide's so they can connect to the eary-access server.

We will help you add the communication code to your game - so,
we are going to limit early access to 10 (or so) developers (we are a small team).

The early-access will be released two weeks after at least a couple of people confirm show interest in trying it.

NOTE: This is going to be a very limited server - that is, it's not going to have advanced features like register/the hall/etc.

Please, let us know if you are interested.

Cheers!
  View user's profile Send private message
  • Joined: 21 Sep 2022
  • Posts: 7
  • Location: Brasil
Reply with quote
Moonwalk
Post Posted: Tue Oct 04, 2022 12:30 am
Hi everyone.. I found that video in twitter moonwalk pretty cool sounds good to play multiplayer on - line anyone?
  View user's profile Send private message Visit poster's website
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Fri Oct 07, 2022 9:09 pm
Hi! Rui here.

We're working on the server, so you guys can experiment with NET80's.

This is the Early Developer version of the server.
By using it, you will be able to test the server and perform timing tests.

So, you can try different sub-routines and test them, before commiting to building your own NET80's box.

We are a very small team, so we will be limiting access to the Early Developer server to 8 (or 10) people.
The Early Developer version of the server will also limit game rooms to up to four players.
These restrictions will be removed, as we approach the launch date of the public version of the server.

The Early Developer version of the server will be available on the 17th.
So, if you would like to experiment with NET80's, please let us know.

The screenshot below shows you the interface for running your tests on the server. (some buttons and messages are in brazilian portuguese, but that's because of my browser's configs).



Cheers!
[/img]
  View user's profile Send private message
  • Joined: 29 Mar 2012
  • Posts: 879
  • Location: Spain
Reply with quote
Post Posted: Sat Oct 08, 2022 2:32 pm
great to read!

I haven't had much time to start experimenting yet, but I'll let you know!
  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Sat Oct 08, 2022 11:18 pm
Hi, kusfo.

You're going to love NET80's.

We will provide a way for you to communicate with us on the NET80's website, so we can send you username, password and urls to use when you're ready to start experimenting with it.

The server is going to be open to Early Developers on the 17th, and a short multiplyer tutorial will be release one week after that.

Cheers!
  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Sun Oct 09, 2022 1:54 pm
Almost there! :)

  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Fri Oct 14, 2022 3:33 pm
We have now added support for the NES.

Now, you can write games for the SMS and the NES, that talk to each other over the internet.

The SEGA Genesis/Mega Drive will be added soon - other consoles will be added in the future.

The Early Developer server will be available net week.

Attahed, a screenshoot of the interface including the SMS and the NES, and the new version of the API manual - for both consoles.

Cheers!
net80s_sms_nes.png (130.71 KB)
net80s_sms_nes.png
net80s_api_manual.pdf (83.33 KB)

  View user's profile Send private message
  • Joined: 21 Aug 2021
  • Posts: 41
Reply with quote
Post Posted: Fri Oct 14, 2022 5:54 pm
Updated API manual.

Cheers!

  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!