So it's been a while, and I might as well mention some status bits.
Newly discovered bugs in lisafsh-tool:
Yesterday was talking to James Denton and he noticed that LisaFSH tool seems to chop off the first few bytes off a file - I suspect this is because they're in the meta data block. i.e. the metadata is the first 0x34 bytes and the rest is the actual start of the file, or something like that. (This is similar to unixen file systems where if your file data is small enough it's included in a portion of the inode, but in this case it's not in the extent file, but rather in the metadata block.)
There's another bug in LisaFSH tool where it doesn't see all the directory blocks (I think I just fixed this one, but need to test it some more.) It will still extract all the files, but names will be file-xxxx instead, and doing dir will not show the whole disk.
There's a few other old issues such as the extracted files have junk at the end because when I wrote this, I didn't know the exact file size, though I'm pretty sure Natalia Portillo has discovered the size fields and I need to add those to the code.
Bigger problems with LisaEm itself:
But there's a bigger issue that's been blocking me for about two months now. I've mostly implemented XModem code for the TerminalWx code bit. (Unfortunately I should have either pushed an RC before this or opened a branch, so now it's kinda difficult to segregate this code and do an RC release without finishing it.)
Potentially the Lisa has a maximum need for something like 16 terminal consoles. (2 for Serial A, B, 3x expansion slots, each with the possibility of 4 serial ports for the Quad Tecmar Serial Port Card or its modern Sapient clone, one more for interfacing with BLU and yet another as a console for Xenix/UniPlus/LPW.)
So I implemented the TerminalWx as a pair of 16-member arrays that use null pointers (one set for the TerminalWx window, the other for the wxFrame). I won't actually open 16 windows, but rather as one is needed a terminal is constructed at these pointers are populated with a pointer to the relative object.
Event handling:
But this causes an issue for the event handling. Events in wxWidgets are handed via macros like so:
wxBEGIN_EVENT_TABLE(TerminalWxFrame, wxTerm)
EVT_TERMINAL_INPUT(TerminalWx::OnTerminalInput)
EVT_MENU(wxID_CUT, wxTextCtrl::OnCut)
EVT_MENU(wxID_COPY, wxTextCtrl::OnCopy)
EVT_MENU(wxID_PASTE, OnPaste)
EVT_MENU(wxID_SELECTALL, wxTerm::SelectAll)
EVT_MENU(ID_FileCapture,OnFileCapture)
EVT_MENU(ID_TextUpload, OnTextUpload)
EVT_MENU(ID_XMODEM_UP,OnXmodemUpload)
EVT_MENU(ID_XMODEM_DN,OnXmodemDownload)
EVT_TIMER(ID_Timer,OnTimer)
wxEND_EVENT_TABLE()
So how do I tell it which of the 16 window frame event handler is to be registered? I think I might be able to extract a window ID from the event and use that as a sector, and call back the member from one of the objects in the array, but not 100% sure yet.
That's one issue.
OnXModemUpload member function is defined, but not recognized:
But this more immediate compile time error one is very maddening. It's saying it doesn't have a member function OnXmodemUpload even through it's both in the header where the class is defined and in the cpp file where it's implemented! I've even copypasta'ed the member name, and it still throws the same error. Anyone seen anything like this? What's the fix?
In the .h file I have
class TerminalWxFrame: public wxFrame
{
public:
TerminalWxFrame(wxWindow* parent,wxWindowID id = -1, int port=-1);
virtual ~TerminalWxFrame();
...
void OnFileCapture(wxCommandEvent& event);
void XModemSendBlock(void);
void XModemReceiveBlock(void);
void OnTextUpload(wxCommandEvent& event);
void OnXmodemUpload(wxCommandEvent& event);
void OnXModemDownload(wxCommandEvent& event);
...
}
And in the .cpp file I have the actual implementation of the OnXModemUpload method (I used to have the unused macro there but removing it didn't help):
void TerminalWxFrame::OnXModemUpload(wxCommandEvent& event) //WXUNUSED(event))
{
if (xferproto) {wxMessageBox(_("Cannot start XModem upload as another file transfer operation is in progress"),_("Cannot Upload now"), wxICON_INFORMATION | wxOK); return;}
wxString openfile;
wxFileDialog open(this, wxT("Upload File with XModem:"), wxEmptyString, wxEmptyString,
"BLU files (*.dc42;*.blu;*.bin)|All (*.*)|*.*)",
(long int)wxFD_OPEN,wxDefaultPosition);
if (open.ShowModal()==wxID_OK) {
wxString filename=openfile.GetPath();
upload=fopen(CSTR(filename),"rb");
if (!upload) {wxMessageBox(_("Could not open file for upload"),_("Cannot Upload"), wxICON_INFORMATION | wxOK); return;}
...
However, gcc (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0) is throwing this, and I've no idea how to go about fixing it.
src/host/wxui/z8530-terminal.cpp: At global scope:
src/host/wxui/z8530-terminal.cpp:652:6: error: no declaration matches 'void TerminalWxFrame::OnXModemUpload(wxCommandEvent&)'
652 | void TerminalWxFrame::OnXModemUpload(wxCommandEvent& event) //WXUNUSED(event))
| ^~~~~~~~~~~~~~~
src/host/wxui/z8530-terminal.cpp:652:6: note: no functions named 'void TerminalWxFrame::OnXModemUpload(wxCommandEvent&)'
In file included from src/host/wxui/z8530-terminal.cpp:81:
src/host/wxui/include/terminalwx_frame.h:11:7: note: 'class TerminalWxFrame' defined here
11 | class TerminalWxFrame: public wxFrame
So... uh, wtf's going on there?