Skip to content

Releases: SweMonkey/smdt

v0.34.0 - Software renderer

08 Mar 18:46

Choose a tag to compare

Changelog v0.34.0:

This update has taken way to long to get pushed due to bug fixing and me getting distracted by adding new shiny things...
I know for a fact that all the modifications to the terminal parser has introduced new bugs and/or compatability issues, I have tried my best to iron out most obvious bugs.

The main big new feature of this release is the new 4x8 font renderer, which is capable of doing both foreground and background colour text (16 FG, 16 BG).
The new renderer is about 50% slower than the previous default renderer but it is capable of so much more, and on a 4800 baud connection it is still about 10 times faster than it needs to be.

In the future I want to clean up SMDT, it is becoming a bit of a mess due to all the different text rendering modes (6 different ones!)

Telnet

  • Added a ton of new escape sequences, many fixes and for sure introduced new bugs in a few of them...
  • Fixed leading zeroes in escape sequences.

Shell

  • History queue is now "partially" remembered between system resets (power cycle / rom reload kind of resets).

Terminal

  • Wrap mode can now be forced on or off.
  • Sequences can now be reset/restarted.
  • Dummy APC payload handling along with "special" byte handling. Special byte means that the last byte is one of these: # % ␣ (preceded by ESCAPE).
  • Added global reverse colour setting along with initial character protection attributes (only works on the main screen and only when using the software renderer for now).
  • A shitton of improvements and "deprovements" to the parser. I really can't be assed to list all tens of thousands of changes here. See diff of file "Telnet.c".
  • Software rendered 4x8 text mode added;
    It can display 16 foreground colours and 16 independent background colours in the same character glyph.
    The only drawback to this new mode is that its not possible to anti alias the glyphs anymore and that the printing speed is halved (74 characters per frame vs 156 characters per frame).
    Still a work in progress but a lot of time has been spent debugging it. It is stable enough to be the default text mode in the terminal shell and telnet client from now on.

IRC

  • Optional time stamp prefix for messages, defaults to OFF; To enable/disable, see Quickmenu -> Settings -> Client settings -> IRC -> Time stamp.

Misc changes & fixes

  • Relevant states now have proper sprite init functions.
  • Statusbar functions, string and icon handling has been moved to its own unit: system/StatusBar.c
  • 16 colour palette selection, choose from xterm, CGA/EGA and windows colour palette.
  • "Temporary" shortcut to view the main screen in hexviewer, see Quickmenu -> Debug -> HexView - Screen.
  • Saved variables can now be overriden during use by the user, but they are always reverted back to their saved state during boot.
  • Minimal ANSI.SYS emulation (only enabled when running the "type" command).

Changelog v0.33.4:

Telnet

  • Previous release filtered out nonsense byte sequences, this change makes sure to not drop bytes which clearly isnt a part of an escape sequence and instead reinsert them back into the stream and cancel escape sequence parsing.
    For example, in the invalid sequence "$1B $5B $0D $0A" only $0D and $0A will be reinserted into the stream while the rest is dropped.

Terminal

  • A fair few fixes to line wrapping along with CUF/CUB etc. Wrap pending flag now works. Todo: I know for sure some cursor movement code somewhere may still ignore the wrap pending flag and thus break, I'll get around to fixing those as I encounter them.
  • Re-added BG attributes.

Misc changes

  • Added the "type" command.

v0.33.3

23 Nov 21:15

Choose a tag to compare

Changelog:

Telnet

  • The client will now set a default title when attempting to connect to a server.
  • The client will now inform the user when a connection failed when attempting to connect to a server.
  • Filtered out some nonsense escape sequences (ESC ESC, ESC \r etc).

System

  • malloc is no longer used in fprintf :^)

UI

  • Added spinbox widget.

IRC

  • It is now possible to switch channels using the mouse by clicking on the channel number.
  • Added options to individually disable JOIN, QUIT, PART and NICK message types. See QuickMenu -> Settings -> Client settings -> IRC -> Message filters.
  • Bugfix: Received filtered message types won't show a channel as having new messages in them.

Misc changes and fixes

  • QuickMenu: Added support to select multiple options in a menu.
  • Joypad bugfix: All keys mapped to the joypad got stuck as KEYSTATE_UP if no keyboard or mouse was connected (Joypad being the main input device). This was causing issues with windows listening to key up states and caused instant closing of windows for example.
  • Pseudofile bugfix: Failed to create pseudofiles such as stdout if no SRAM is present. All subsequent writes to stdout was also lost causing a blank screen at the terminal shell.

v0.33.2

05 Nov 21:24

Choose a tag to compare

A lot has changed in this update, expect bugs!

I'm not very happy about a few of the changes in this update;

  1. The mouse integration code in the UI toolkit could be a lot better, probably worth rewriting the entire UI toolkit at some point with mouse interaction in mind.
  2. The http webserver is kinda meh, but works good enough... because really, who in their right mind would host a website on a megadrive?
  3. All the other stuff I've forgotten about, this update has been written over the course of a few months :p

Changelog:

Terminal

  • Removed BG colour attribute stuff, no point in parsing and interpreting it when it wont ever be used.

Telnet

  • Initial mouse tracking code added, but for the most part disabled until completed.

System

  • Palettes and colours are now stored in an array in RAM and in case it has been modified then that array is DMA'd to CRAM in vblank.
  • Fixed a bug in RevertState which caused an infinite loop, the system would abort state switch and retry infinitely. Fix: Make sure VBlank can't run during early state switch.
  • Pseudofiles implemented; stdout, stdin, stderr (residing in /sram/system/) now works more unix like.
    All terminal shell text is now piped into the stdout.io pseudofile by default ( internal printf is actually fprintf(stdout, ...) ).
    You can now pipe any command output into a file by running this: somecommand > outfile.txt or appending: echo appending this text >> existingfile.txt
    Serial input/output is split into 2 pseudofiles, tty_in.io and tty_out.io.
    stdin exists but is not properly implemented yet.

Drivers

  • Added Mega Mouse support.

UI

  • Removed flickering when navigating the Quick Menu.
  • Added mouse support to the GUI... mostly, irc nick window do not yet support mouse tracking and bookmark window has some bugs (such as clicking items in the list ignores scrollbar value).
  • Misc UI helper functions added.

Network

  • Fixed upload icon. It was always set to idle state even when it should be set to "on".

Misc changes and fixes

  • The boldfont variable is now properly reset when selected font is any but the bold font.
  • Shuffled some stuff around from VBlank handler to mainloop.
  • Added a http webserver... because why not, extremely barebones and may does contain bugs. Create a default config and www directory with the command test -www_create and start the server with the command webserv
  • Removed sprite linking setup from screensaver code.
  • Timer functions added; FrameElapsed() and SecondElapsed(), used to detect when a frame or a second has elapsed.
  • Testing out new status bar icons, I may revert these in the future... Source for icon pack: https://shmorgus.itch.io/micro-icon-pack (License: CC0) - Shoddy keyboard icon was made by me.

Known bugs

  • Rebooting from an exception may cause the blastEm emulator to hang after the first few boot messages, can't replicate this hang using real hardware... Something happens after or during enabling all interrupts.
  • Upload icon can still get stuck in certain circumstances.

v0.33.0

03 Aug 19:37

Choose a tag to compare

Terminal shell

  • Shell fixes; Running commands will now be "delayed" to run and all text buffering will be dealt with properly (pre/during/post running).

Telnet

  • Added scrollock functionality, it will halt printing to screen but beware that the rx buffer may fill up and drop incoming data!

UI

  • Added a barebones "window manager" to deal with the increasing number of GUI windows.
    All windows except the IRC nick list window has been updated to deal with the window manager.

  • Added a system information window which shows CPU, RAM and buffer usage, along with device viewer and system info such as region, version and smdt version etc. See Quick menu -> Debug -> System Info.

  • Added horizontal progress bar to the UI toolkit.

  • Floating windows didn't set the correct attributes and could end up using attributes from the window/UI element below it.

  • Fixes to the vertical scrollbar. It should now properly move over the entire range without trying to leave. Also made the slider dot longer depending on amount of scroll the scrollbar has.

  • A few tweaks to the theme palettes... for better or worse.

Time

  • Rewrote large portions of the date/time code; Earlier version was based on some ancient code I wrote a long time ago. New code should deal with time a lot better (leapyear support etc).
    Note: Clock will drift due to unreliable time ticker (Vblank, which may not always be enabled), SMDT will try to compensate with "leap frames" every now and then.
    Ultimately this is a futile exercise and the clock will always drift a few seconds over several hours no matter what (and I don't feel like autopolling time servers every now and then is a good idea).

  • Clock in terminal shell now only shows HH:MM instead of HH:MM:SS to avoid updating the text every second.

IRC

  • Clock should no longer mismatch between what may be printed in chat with the time reported elsewhere in SMDT (1900 vs 1970 epoch mismatch).

  • Fixed CPU usage "bug", the text input bar at the bottom was being read/parsed/updated every frame regardless of whether it needed to be updated or not - (60% CPU down to 6%).

  • It was possible to send empty /privmsg messages which caused SMDT to send whatever garbage it could find to user/channel.

  • Titlebar fixes; All the space between "SMDT" and "12345" should now be used for server/channel/nick text, before it was cut of early.

  • No need to use "/raw " anymore, it is now possibe to just type the command as written on the irc channel.
    For example, before: "/raw ns help"
    now: "/ns help"

  • Added "/msg" command, it is identical to the "/privmsg" command.

  • Fixed nicklist; the last nick in the list was never added to the internal nick list, hence always missing one nick.

  • Joining a channel with no MOTD caused the smdt irc client to never add the channel (the channel tab text would remain "EMPTY PAGE" until a message or action was taken in it).

Network

  • Uploading/Downloading icons in status bar is now lit up based on data availability in rx/tx buffer respectively.
    May need to special case the upload icon though since data is usually all sent before SMDT gets a chance to check and update the upload icon (tldr upload icon always remain unlit because all data is already gone).

System

  • Multi partition support added. SMDT by default now have 2 mounted filesystems; "/sram/" and "/rom/", the former being used as a normal filesystem while the latter is read only (since it resides in ROM).
    In the future the ROM fs will contain default config files and executable binaries.

  • Fixed an LittleFS bug that would cause div0 exception when running SMDT using the Exodus emulator.

  • Added global brightness control. Controls the screen brightness (55% to 115% in steps of 15%). See Quick menu -> Settings -> Colours -> Brightness.

Misc changes and fixes

  • Removed the fake tree styled boot messages.

  • A few fixes to the saturn keyboard driver since it seems I never really finished it.
    1: It now makes sure it has a valid packet (nibble 0 and 1 being a certain value and that the packet is either a make or break code).
    2: Driver init fixes.

  • Bookmark functionality is now finished. It is now possible to add, edit and delete bookmarks using the bookmark window.
    Bookmarks are saved to "/sram/system/favlist.cfg", the file will be copied from "/rom/cfg/fvlist_default.cfg" in case that file does not exit.

  • Bugfixes to cp and mv commands;

  1. fclose() was trying to free() an uninitialized pointer when trying to copy or move a nonexistent file...
  2. Upon failure the current working directory would be changed and left at where the file was supposed to be moved/copied to.
  • Minor fixes to light mode (QuickMenu -> Settings -> Colours -> BG Colour -> Light mode). 8x8 and 4x8 fonts, in both 8 or 16 colour should be pretty good now. Mono colour 4x8 mode is a bit ugly unless you set a "proper" text colour.

Known bugs

  • Rebooting from an exception may cause the blastEm emulator to hang after the first few boot messages, can't replicate this hang using real hardware... Something happens after or during enabling all interrupts.

v0.32.0 - The boatload

13 Apr 18:17

Choose a tag to compare

A lot has changed under the hood in the past months... many fixes and additions (and probably bugs) to improve xterm compat but its still far from perfect.

This changelog does not cover all the little changes in this release, refer to the diff if you want to go crazy...

Telnet / Terminal

  • Added tabstops (forward and backward) and all related escape codes.
  • Rejigged how IAC/ESCAPE/UTF8/Data codes are handled in TELNET_ParseRX().
  • A boatload of fixes and additions to the escape parser, still far from perfect but running esctest; https://github.com/ThomasDickey/esctest2 is starting to show some good results...
  • A boatload of new escape codes added, many of which are still not quite perfect and a few fixes to common escape codes
  • Once again I have shortened the titlebar prefix to only "SMDT".
  • Fixed telnet IAC NAWS subnegotiation, turns out I sent IAC SB ... instead of IAC SB NAWS .... This has been broken ever since IAC support was added, whoops!
  • Font change now takes which of the buffer is used into account (main or alternate), previously it would always change the screen to the main buffer even if the terminal was using the alternate buffer.
  • Terminal should no longer be blank after a soft reboot.
  • Character set is now selectable between CP437 and UTF-8; QuickMenu -> Settings -> Client settings -> Terminal -> Character set.

IRC

  • Nick colour can now be changed when using 4x8 font; QuickMenu -> Colours -> 4x8 Mono colour.
  • The nick list now caps at the max number of nicks it can show, previously you could scroll down beyond what it could show (this is a memory limitation).
  • Fixed an issue where the NAMES list parsing could cause the MD to lock up by writing beyond allocated memory. (Number of nicks on a channel being more than SMDT can handle).
  • Some fixes to word wrapping.
  • Multi line messages are now indented following previous lines.

UTF-8

  • Rewrote the UTF-8 parser and handling; It can now interpret all codepages and if not found it will print an ? to the screen instead of garbage bytes. Previously it was very hardcoded to only handle $Ex xx yy UTF-8 codes.
  • The fact that the UTF-8 parser can now distinguish what is and isn't UTF-8 bytes means that it won't swallow up bytes that may be a part of some other code like an escape sequence.

Network

  • Split and rewrote NET_SendChar/NET_TransmitBuffer/NET_BufferChar functions to be a bit ... leaner(?).
  • Data that needs to be sent directly does not have to wade through a bunch of buffer code anymore.
  • NET_TransmitBuffer() now calls NET_SendChar() instead of sending data on its own.

Misc changes

  • Miscellaneous keyboard code cleanups.
  • RxBytes and TxBytes are no longer reset upon state changes in release builds.
  • Debug logging changes / more gatekeeping.
  • Added the DebugStreamer back, although as a seperate function. This is used to play back logged streams and debug them.
  • HexView will now stop printing lines if the opened file is less than 192 bytes in size and only print the amount of data that is actually in the file.
  • The telnet -tty option has been removed, it is no longer necessary.
  • Added some numpad keys to scancode table.

Known bugs

  • TimeToStr_Full() in IRC client does not take your timezone into account? (Command 333 @ IRC.c).
  • 4x8 colouring in IRC can only colour even number of characters, uneven number will result in the final character being uncoloured.
  • Spurious keyboard in certain terminal applications / telnet servers - Can easily be reproduced in blastEm while running dwarf fortress, meanwhile I have yet to be able to reproduce this glitch on real hardware.
  • Sticky shift key - Sometimes the shift key gets "stuck", fixed by pressing shift again.
  • Slider in scrollbars - their position may go beyond the edge due to rounding errors.
  • Gopher client is broken atm. It assumes some things of the terminal which is no longer true, which causes quite a few rendering errors. Not sure if I'm going to keep the gopher client or remove it from SMDT...

v0.31.4 Bugfixes & additions

02 Jan 21:43

Choose a tag to compare

IRC

  • Added NICK and PART to the internal command parser that parses messages received from the server. (Sending NICK/PART from client to server is already supported)
  • Reverted the upload icon colour back to default, changing it from red to orange serves no purpose anymore.

Telnet / Terminal

  • Prototype scrollable regions (Scroll part of the screen vertically). It can scroll content upwards only! scrolling down requires more work.
  • Rewrote the OSC parser so it is not hardcoded to just reading title changes.
  • Fake RGB24 attribute colour support (Truncates RGB888 to RGB111, yes 1 bit per channel).
  • Rewrote attribute code parser slightly, hopefully I haven't borked colour attribute changes in some way...
  • Cursor is now using s16 instead of s32 (Haven't dared to change this before in case of hidden edge cases).
  • Changed Backspace default back from ^H to DEL now that I've found out why it bugged out at times (smdt manually moved cursor and inserted blankspace, it shouldn't do that).
  • Too many little changes and fixes here and there to list, mostly related to improved linux tty remote compability.

Telnet

  • Added IAC DM (Data Mark).
  • Added F1-F12, Page Up/Down, End, Home, Insert and Delete function keys.

Drivers

  • Added timeout to pinging in xport driver, apparently there wasn't one already...

Misc changes

  • Buffer system now uses boolean return values instead of cryptic magic numbers as return values on PUSH/POP.
  • Cleaned up Buffer_PeekLast() and various other functions.
  • For no real reason: 2 new theme colours: Aqua and hot pink. Don't ask why.
  • Removed old debug streaming.
  • Some UTF-8 code point fixes and additions in U+2500 and a few arrows in U+2190.
  • Added 68k exception pages (Inspired by Vladikcompers recent exception handler added to SGDK). Still fairly basic but its better than what SMDT had before: no exception handlers at all.
  • Uname command can now show SMDT build date and time.

Bugfixes

  • IRC: Receiving NAMES list should no longer show a channel as having new messages.
  • IRC: Nicklist now shows the last nick in the nicklist. Beware that showing >300 nicks may cause issues still.
  • IRC: Normal mIRC colours should now work as expected when using 4x8 fonts, albeit in mono (2 colours).
  • IRC: Now using \4 and \5 to set/unset custom text colouring in IRC (instead of \1 and \2), in hindsight this change was not actually necessary but it doesn't matter anyway.
  • Telnet/Terminal: Fixed G1 charset bug that caused the terminal to use the wrong character set in certain applications.
  • Telnet/Terminal: Fixed ESC PARAM not resetting all parameters between different escape sequences.
  • Telnet/Terminal: Finally fixed wraparound "bug" that appears when the terminal receives \n at column 80 (causing 2 newlines), as opposed to receiving a printable character at column 80 (which should wrap and print to the next line).
  • Drivers: Maybe fixed PS/2 timing issues on model 2 / NTSC genesis systems?

Known bugs

  • TimeToStr_Full() in IRC client does not take your timezone into account? (Command 333 @ IRC.c).
  • 4x8 colouring in IRC can only colour even number of characters, uneven number will result in the final character being uncoloured.

May be bugs?

  • Spurious keyboard input when SMDT is overwhelmed by large incoming data transfers? May be emulator/xport emulator error on my end but I have not noticed this problem in previous versions of SMDT...

v0.31.3 bugfixes

04 Nov 20:04

Choose a tag to compare

v0.31.3 Bugfixes

  1. IRC mono colour antialiasing colour is now updated to reflect the new amber text colour.
  2. Interrupts were disabled to early on StateExit() which made the XPN drivers unable to actually communicate during Disconnect(). This caused excessive delays when trying to disconnect from servers.
  3. Added timeouts when doing date synchronization, in case the time server is not responding.
  4. Changed Backspace default from DEL to ^H . As before, this can be changed manually in the quick menu.

v0.31.2 Bugfixes

IRC TM buffers were not setup correctly on creation, leading to the first line getting coloured.

v0.31.1 Bugfixes & IRC QoL additions

03 Nov 00:38

Choose a tag to compare

Mostly minor bugfixes and some quality of life additions to the IRC client, along with some updated info regarding SMDT-PC and a FAQ in the readme.

IRC

  • Added option for word wrap on screen edge.
  • Added option to ignore and not print join/leave messages as they can get somewhat spammy and make some channels hard to read.
  • Added 1 bit colouring to 80 column mode; Names are now coloured in both 40 and 80 column mode.

Bugfixes

  • Hexview no longer fails to start when trying to open an empty file.
  • Rx statistics enabled again in terminal/telnet client, it would previously not record received bytes.
  • Automatic more/less enabled again. What does this do? well it makes sure that only a screens worth of text can be printed at once, after which is will stop printing text until you press a key.
  • Setting IRC font while running the IRC client accidently initialized the terminal/tty backend and screwed everything up, whoops.
  • Actually register nick change with server when doing /nick newnickname.

v31: Filesystem support, WIP gopher client

21 Oct 21:15

Choose a tag to compare

This release adds littlefs filesystem support, a very WIP gopher client and a WIP bookmark system to SMDT.
In addition a lot of little fixes and smaller features has been added.
So much has been changed and added to this release while less than usual testing has been done, so expect bugs :)

Terminal

  • Added a few IAC's; Go-Ahead, NOP and End-Of-Record, these will be treated as NOP most of the time. SMDTC does not respond with GA / To GA. Fixes a few bytes that previously got swallowed up by the IAC parser.
  • Added the alternate buffer (mode ?1049 and ?47). Max 80 columns is now enforced when using 4x8 fonts, likewise for the 8x8 fonts a max of 40 columns is enforced. In the future this could be increased to a max of 128 and 64 columns respectively.
  • Minor wraparound fix, terminal wrote 1 character beyond wrap limit.

Gopher

  • Initial gopher client, WIP.

Filesystem

Very WIP filesystem support for SMDT. Beware data loss and bugs!

  • Added littleFS support. SRAM is now a littlefs filesystem, which means previous SRAM configurations will be lost. New config file will be saved under /system/smdt_cfg.bin
  • New terminal commands: touch, mkdir, ls, rm, cat, mv, cp, lsblk.
  • File ops support: r/w, seek, tell and close.
  • Minimal lsblk implementation.
  • Scrapped dosFS support.

Misc

  • Initial bookmark list window, WIP.
  • Fixed descender on lowercase g in the 4x8 font set, rounding looks a bit off however.
  • Graphics is now compressed in ROM to keep the ROM size below 256 KB.
  • HexViewer can now open and view files on the filesystem.
  • Added "About SMDTC" command about
  • Setting font size now clears text on screen instead of leaving it in a odd looking state.
  • Coloured boot messages indicating fail/ok and indentation for submessages.
  • Removed some unnecessary menu entries in the quick menu.

Todo

  • Gopher: Going back or forward a page.
  • Gopher: More testing on hardware to see if it can still crash the mega drive.
  • Bookmarks: Add/Edit bookmark functionality is currently not implemented (Only the window logic is programmed).

Known bugs

  • IRC: Nick list is missing 1 nick, see command 353 in IRC.c

  • IRC: Erroneous string comparison in command 353, in IRC.c

  • Drivers: PS/2 keyboards may not always be detected when plugged into pin 3+4 (as opposed to pin 1+2). Also needs more testing on NTSC systems.

  • Drivers: RetroLink cartridge rx issues.

  • Drivers: xPort device may not be found during startup if the xPort device does not have an IP and or not being ready yet.

  • Temporary fix, in cases where a device was not detected: try running the command test -devinit

Bugfixes

  • Many.

v0.30.3

02 Aug 00:32

Choose a tag to compare

Terminal

  • 16 colour support for the 4x8 font. Achieved by sacrificing the inverted character set (only when using 16 colour 4x8!).
  • Added the "tty" command; it initializes the SMDTC TTY to a sane enviroment for connecting to a Linux TTY, although still somewhat iffy and some functionality is still missing.
  • Added support for DECCKM (Cursor Key Format). "Cursor", "Numpad cursor", "Home" and "End" keys should now switch reporting mode correctly.
  • Control characters can now be entered by pressing CTRL + <key>, for example: CTRL+C will send ^C.
  • History queue can now store 2 commands.

UI

  • Added preliminary ColourPicker widget, Tab widget and ConfirmBox widget, these will be finalized later on.
  • These widgets can be tested in the UI tester; Quick menu -> Debug -> UI Tester.

Misc

  • Boot prompt now uses the terminal instead of the drawing on its own to the window plane. This allows for much better printing, colour and scrolling support if needed.

Bug fixes

Terminal:

  • Mode set/reset in parser got broken in an earlier commit. Escape sequences such as ESC[?Ⓝh should now work again, applications such as nano now renders properly again.
  • Added a few skeleton escape codes, ie doing the bare minimum to handle them for now so they don't mess with previous/following escape codes.

Device Manager:

  • Joypad was set to a weird state after the PS/2 keyboard detected scan iterated through all ports, which caused a few buttons to not work on joypads.

Drivers:

  • The PS/2 keyboard detection scan will now only scan ports with an unknown ID, this is to avoid disturbing devices which for certain is not a PS/2 keyboard.
  • Hopefully fixed the XPN driver for the last time; Pinging does not get stuck in monitor mode any more.

Misc:

  • Cursor fixes; due to earlier optimizations the cursor Y position did not always get updated.
  • Fixes in 4x8 font tilesets; 1 stray pixel in one character and 1 missing pixel in another character. The characters in question are used for line drawing.

Known bugs

  • IRC: Nick list is missing 1 nick, see command 353 in IRC.c
  • IRC: Erroneous string comparison in command 353, in IRC.c