Uzenet

Topics regarding the Uzebox hardware/AVCore/BaseBoard (i.e: PCB, resistors, connectors, part list, schematics, hardware issues, etc.) should go here.
User avatar
D3thAdd3r
Posts: 3293
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Uzenet

Post by D3thAdd3r »

kivan117 wrote:Is it something that you can set via the Uzenet setup program?..........I definitely understand the appeal of having our own custom firmware in the future now that I've been messing with this some.
What firmware you get with the device depends on where it came from, and might even be different depending on how old it is. The situation seems to be steadily improving with good official espressif versions now. The very early firmware versions are garbage, it would randomly do things that make no sense, then reply "this no fun." then "busy now.." and you'd have to reset. Different versions support different things, the newer versions of the firmware seem like they are getting to the point of decent and have many features. It has been pretty common in a lot of the new firmware versions people make to always start at 9600 baud so anything could interface with it, and then can change the baudrate on the fly using the AT+CIOBAUD=38400 or such, as found here. New versions also support upgrading their firmware over the internet, with revert to old version on failure, and there is a way to direct it to download any custom version. I saw some guy made a little PHP script that he used to do it, but that's all I know about it so far. It would be practical to keep everyone up to date automatically from http://uzebox.net once they have at least a version that can do Over The Air upgrades.

BTW try out the emulator version I put a link to in my previous post. There are hex programs(chatter.hex and listener.hex) already set up that will make Uzem show up in the chatroom and you can see the chat on your real hardware! Now...anyone could have gotten onto Uzehcat in Uzem months ago....no one but Alec seemed to have tried it at all :lol: I am starting to work on the emulation again starting tomorrow afternoon, it isn't far from done.
User avatar
kivan117
Posts: 73
Joined: Sat Mar 14, 2015 5:43 am

Re: Uzenet

Post by kivan117 »

BTW try out the emulator version I put a link to in my previous post. There are hex programs(chatter.hex and listener.hex) already set up that will make Uzem show up in the chatroom and you can see the chat on your real hardware!
I did just that last night. Was a pretty cool moment to watch as the chatter bot showed up on the hardware and see my messages from hardware showing up on the listener. You weren't kidding about it running slowly though, haha. That version at least runs at like 2.x Mhz on my pc Gets the job done though for now so thanks for your work on that front.
New versions also support upgrading their firmware over the internet, with revert to old version on failure, and there is a way to direct it to download any custom version... It would be practical to keep everyone up to date automatically from http://uzebox.net once they have at least a version that can do Over The Air upgrades.
Agreed. That would be a great way of making sure everyone is using the same firmware, so we know it'll act as expected, while allowing people to still get their hardware for it from whatever site is cheapest for them.
User avatar
D3thAdd3r
Posts: 3293
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Uzenet

Post by D3thAdd3r »

The setup program is needed eventually and should be pretty easy to work on different sections in parallel and glue the pieces together for the 80 columns mode. Now it would be cool to have user pictures and game icons which we could do with mode 3, but it's hard to justify the low resolution for this one unless someday we can mix video modes..I digress. The setup program should easily be able to handle the full FatFS, and I think it would be very nice if the setup program can just download an official SD image so everyone is working with the exact same thing. When you are done developing a game the .uze and resource files get added to the official image. Everyone can keep their image current with no searching and only a couple pushes of a button. As far as I know we wouldn't even need FatFS for that, could we just download a 512 byte block at a time and dump it to the SD card to clone it?

What does this setup program need? I think these are mostly accepted ideas:
  • 1. 8266<->router setup
    2. chat room
    3. game browser+however you setup a join then launch a rom?
    4. sd update to official version
    5. setup player nickname, bio, etc.
    6. 8266 firmware update(would require the user to manually update to a version that can do web updates if not already, or implement more complicated UART upgrade)
    7. maybe built in Telnet
I didn't bookmark the site so I have to find it again. With difficulty I tracked down a very cool minimal webpage that you can send a URL to and it spits back at you a well formatted text only version of any webpage, and a list of links at the bottom(which could simply not be drawn, and be stored in SPI ram if the user wants to follow a link). The format was usable for the sites I tried, and the forums worked pretty well. It was like the Lynx browser, but not. A later bell and/or whistle that is possible. Obviously no images, java, client code, etc...I don't know, because we have ram and we can?

We should have tons of flash to spend. What graphic resources does this beast need? Upper and lower case font, a cursor, and a simple menu frame ought to be the minimum.

I envision this thing cursor based and supporting both the SNES mouse and keyboard interface or falling back to a joypad when not available. Using the joypad to move a cursor works well when a mouse isn't available as in Uzesweeper and *secret game related to Uzesweeper*. It has the advantage that you can more easily deal with multiple interactive elements on the screen. If you are in the chat room it would be nice to secondary click on some ones name and then click "request game" or something.

How can we make it easy for people to find each other? I thought we could go the standard route, if you wanted to play a game you create a lobby and people join it. You trash talk before the game, then click play. I'm not naive enough to think there is ever going to be 100's of people on this service, and because of that, I bet people are pretty flexible on what game they will play when they actually find someone else available. Maybe a lobby isn't really needed. It could be part of the chatroom, and you could simply set your status to "looking for game", you talk to someone ask what game they want to play, the setup program tells uzebox.net you guys are joining a game. Reset your console, load up the game you agreed on, click "Play on Uzenet" and the game asks uzebox.net "what game did I agree to play?"(since the ESP8266 has forgotten after the reset), then play. The advantage is games do not need lobby code, simple a standard API that asks where to connect and proceeds from there. Your odds of sitting in any 1 particular game waiting for someone else to also be waiting in that particular game as well are pretty poor I would say.
User avatar
kivan117
Posts: 73
Joined: Sat Mar 14, 2015 5:43 am

Re: Uzenet

Post by kivan117 »

Some interesting weirdness I've noticed running some basic tests...

When logging on/off, the number of users is reported oddly. Log on and the number of users should go up, but it reports as 1. Log off and it should go down but it reports 2. This is consistent too.

using the "+bye" command works well. When attempting to use a closed link, the 8266 reports "link is not" which is just humorous sounding to me I guess. Other commands are kind of hit or miss though.

Sending +list seems to send back a 1 byte long message of only whitespace.

Still trying to get +whisper to work for me. Maybe it's just me but I can't seem to get it to do anything. The server doesn't reply to me at all when I whisper to another user (which isn't too odd) but the other user receives no message either.

Unfortunately my free time this weekend ended up going just about everywhere but where I intended so I made almost no headway on this chat business, but hopefully it'll work out better next weekend.
User avatar
D3thAdd3r
Posts: 3293
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Uzenet

Post by D3thAdd3r »

kivan117 wrote:When logging on/off, the number of users is reported oddly.
There is a bug in how disconnection is handled and the problem wasn't immediately obvious so I never fixed it. On the server end it can report the user numbers as negative in some situations.

Code: Select all

 //TODO <- my most frequently reused coding technique
kivan117 wrote:When attempting to use a closed link, the 8266 reports "link is not" which is just humorous sounding to me I guess.
Good old "Chin-glish". It is pretty ugly to handle that stuff. You would need to scan the Rx buffer for that string every time you get data to handle it cleanly since it could happen for reasons besides the "+bye" command. It's a difficult task to get all these features working, I have wanted to simply get things mostly working so that everything is in place and not holding us back. Custom firmware could send a single byte that indicates an error, then the error number which would be easier to make a handle for. Needless to say I wasn't too keen on perfecting the annoying string handling either when I intend to do away with it at some point, hopefully.

On the "+whisper" and "+list" I recall they were able to crash the server sometimes, I may have just commented out the broken code as I haven't worked on that for a good while. Since you are currently working on this I will try and get it to a more final state for testing.
User avatar
D3thAdd3r
Posts: 3293
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Uzenet

Post by D3thAdd3r »

A little progress update from my end. Nothing done on the emulator, but I did a lot on the chat server which I think of more as a game lobby at this point. The protocol will soon be different in that you must create an account then login with that name and password(eventually it would get this account data from uzebox.org). You can create/enter private named rooms(with password option) where you can talk with the people you are going to play a game with, discuss game options, and set your status to ready. When the owner of the room(most senior member left in the room) clicks launch and all members are ready, the chat server sends the game server(same machine, different thread, that handles game networking) a signal packet that those players with those ip addresses are starting a game, their status message in the chat room is set to "In Game". It waits for them to reset their console and load the game. The only thing any game will need to know, is how to send the username and password to the game server(which implies needing EEPROM code space, or...manually entering it each time), and calculate a 16bit CRC of the rom they have loaded to make sure everything is right. The game can specify what type of networking it wants to do, after that it's network data that means something to the game. Besides that a host of new commands for admins to reboot the server and other useful things. Still pulling it all together, new version will be up semi-soon.
User avatar
D3thAdd3r
Posts: 3293
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Uzenet

Post by D3thAdd3r »

Doing testing to make sure this stuff really works for hardware network games on Uzebox(Megatris...), got me thinking about the physical side again. Basically I just wanted to share how cool this all looks, and for about the price of 1 redpine module! There are so many 8266 models(and even different revisions of the same model with different colors, or even extra pins!), but here is the majority of them for some eye candy. I think ESP09 is a good way to go for future PCB revisions. It has more GPIOs than the model 1 and just to have a final frontier that no one could ever exhaust the possibilities for, the extra space could be a ESP8266 GPIO expansion header. Anyway, the 09 is pretty cool and should be easy to solder to a PCB that had some large through holes. One of those pads is for a 2.4ghz antenna connection, is that possible to have printed into the PCB?
esp8266_erotica.jpg
esp8266_erotica.jpg (115.65 KiB) Viewed 2542 times
User avatar
uze6666
Site Admin
Posts: 4812
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Uzenet

Post by uze6666 »

Pretty cool pic with all those modules! The ESP-9 is small but the footprint is really made for reflow soldering, not sure how you could insure good contact for the under side pads. Also it doesn't have an antenna or uFl connector onboard which can be a problem (impedance matching). Is there external flash on there? Hard to see from the picture.

The Esp-03 or esp-07 are bigger, but should be easier to solder and have antennas and have a decent amount of extra pins. I'd go with those IMHO. Any other comments?
User avatar
D3thAdd3r
Posts: 3293
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Uzenet

Post by D3thAdd3r »

It seems like the 01 has nothing more high tolerance than normal PCB traces and it seems like it's just a soldered via connection. If it sounds like trouble then it's no good. It is a very small 4layer board, but I thought with a through hole lined up in the center of all those pads(pre tin them lightly), you could get solder up there reliably...now it sounds a bit janky heh. The 09 does have more flash than the other modules with 1MB, and I believe 32k sram, 80k dram which is standard. External ceramic antennas for the 09 would be yet another part to get, and the PCB antenna on the 01 seems to have surprisingly good range from my "testing".

I guess I like the 03 the best then, it is significantly smaller than the 07
User avatar
uze6666
Site Admin
Posts: 4812
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Uzenet

Post by uze6666 »

Can't recall if it was posted elsewhere in the board but here's a nice video demonstrating the range of the esp-8266. Pretty impressive.

Post Reply