LisaList2

Advanced search  

News:

I've successfully built LOS from source!: https://lisalist2.com/index.php/topic,644.0.html

Pages: 1 ... 4 5 [6]   Go Down

Author Topic: ESProFile - A Powerful ProFile/Widget Emulator and Diagnostic Tool  (Read 168623 times)

AlexTheCat123

  • Sr. Member
  • ****
  • Karma: +122/-1
  • Online Online
  • Posts: 420
Re: ESProFile - A Powerful ProFile/Widget Emulator and Diagnostic Tool
« Reply #75 on: November 13, 2025, 05:07:55 pm »

I just stuck a set of C ROMs into my 2/5 (which is actually what it came with when I first got it, interestingly enough), and I can reproduce the issue!

It tries to boot the first time around before hanging a while into the startup process, and I think it would probably boot fully if I had I/O ROM 40 installed. But regardless, there's lots of disk activity and we get the inverted cursor at the bottom-left of the screen before it hangs, meaning that the OS is fully loaded and running. But then when I reboot, I get the PROFILE READ FAILED error just like @ried does.

I vaugely remember something coming up about weird behavior under the C ROM a few years ago (maybe somebody emailed me about it), but I think they just ended up switching ROMs instead of asking me to try and figure out the actual problem. Maybe this is a good time to actually look into it!
Logged

ried

  • Sr. Member
  • ****
  • Karma: +63/-0
  • Online Online
  • Posts: 300
Re: ESProFile - A Powerful ProFile/Widget Emulator and Diagnostic Tool
« Reply #76 on: November 13, 2025, 09:39:30 pm »

Amazing. Thank you for confirming, Alex.
Logged

AlexTheCat123

  • Sr. Member
  • ****
  • Karma: +122/-1
  • Online Online
  • Posts: 420
Re: ESProFile - A Powerful ProFile/Widget Emulator and Diagnostic Tool
« Reply #77 on: November 14, 2025, 12:59:43 am »

Wow, this sure is weird!

After rebooting the Lisa and waiting for it to fail with the PROFILE READ FAILED error, I figured I'd go into Service Mode and take a look at what it actually read into RAM off the ProFile to see if there was data corruption. Maybe that was why it was saying that the read failed; the loader was doing a checksum on the block, saw that it was bad, and printed the error?

Well no, it turns out that the entire block was read in perfectly. Every byte was good. So I decided to try and execute the block straight out of RAM instead (with Call Program in Service Mode), and sure enough, the system booted!!!

This seems really odd to me. Why would the boot ROM's routine that loads the block and then immediately jumps to it cause the block to not execute properly, whereas me executing it manually after the boot ROM loaded it causes it to execute just fine? I don't even see how this is a ProFile-related issue since the problem is happening after the block is already properly loaded into memory, but clearly it has to be...

Edit: I think I might've made a discovery, but it'll have to wait until tomorrow!
« Last Edit: November 14, 2025, 01:22:01 am by AlexTheCat123 »
Logged

AlexTheCat123

  • Sr. Member
  • ****
  • Karma: +122/-1
  • Online Online
  • Posts: 420
Re: ESProFile - A Powerful ProFile/Widget Emulator and Diagnostic Tool
« Reply #78 on: November 14, 2025, 03:39:02 pm »

Good news, I think I fixed it!

It turns out that most of my confusion last night was stemming from me misreading the logic analyzer trace. A few dozen milliseconds after the successful read of block 0, there was a small blip on one of the ProFile signals, but I wasn't paying full attention and thought that it was noise on PD7. Nope, it turns out that it was actually /CMD (right below PD7 in my trace), and it was of course the boot ROM's attempt at reading the next block, block 1.

But for some reason, ESProFile wasn't responding by asserting /BSY when the Lisa asserted /CMD. And given the really short timeout period of the C ROM, the Lisa gave up before ESProFile had time to respond, whereas it waits long enough to get a reply in all the later ROMs.

Why wasn't it responding though? Well it turns out that it was related to interrupts, just as I had guessed earlier. The way that the code previously worked is that it would disable interrupts during the time-sensitive parts of the ProFile operation (the parts where /STRB is being pulsed) and would re-enable them afterwards. But the re-enabling would sometimes cause the code to go service interrupts for several milliseconds since several had queued up while they had been disabled, primarily generated by FreeRTOS. And when the Lisa lowered /CMD to read block 1, we were still off servicing interrupts and didn't see it until it was too late and the ROM had already timed out.

After reviewing the code, I realized that I wasn't actually doing anything that used interrupts, so I could safely get away with permanently disabling them instead of only disabling them during the time-critical parts. I had already turned off the interrupt watchdog timer by directly writing to some ESP32 config register a while back, so the ESP32 wouldn't notice it and get mad at me. And sure enough, that did it!

The error 85 that you would sometimes get was thanks to a minor bug with handling /PRES that only appeared with the comms sequence of the C ROM, which I've also fixed now.

I've attached the fixed firmware here, so I'd appreciate it if @reid (or anyone else with a C-ROM Lisa 1) would try it before I put it up on GitHub. I've tested it with a bunch of OS's on a 2/5 with the H ROMs put back in to make sure it didn't break anything there, but it still needs to be tested with the XLerator to make sure everything still works there as well. I don't have my XLerators handy right now, so I'd appreciate it if someone with an XLerator installed could test it booting XLerated MW+ or MW+][ as well!
Logged

ried

  • Sr. Member
  • ****
  • Karma: +63/-0
  • Online Online
  • Posts: 300
Re: ESProFile - A Powerful ProFile/Widget Emulator and Diagnostic Tool
« Reply #79 on: November 14, 2025, 04:34:29 pm »

Downloaded the test firmware, updated the board. Now I get an Error 85 immediately at the first attempt to boot. Hmmm...

Edit: Yep, confirmed. I updated two ESProFiles to the test firmware and now both generate Error 85 immediately when trying to load Selector (first boot). The errors over serial are the same on both boards:

Code: [Select]
Read  Block: 000000 - Read phase 2: Host didn't respond with a 55!
Another ESProFile that I have not yet updated behaves the same as before, so this does seem to be an issue with the test firmware.
« Last Edit: November 14, 2025, 04:51:09 pm by ried »
Logged

AlexTheCat123

  • Sr. Member
  • ****
  • Karma: +122/-1
  • Online Online
  • Posts: 420
Re: ESProFile - A Powerful ProFile/Widget Emulator and Diagnostic Tool
« Reply #80 on: November 14, 2025, 08:33:36 pm »

Wow, that's so weird. I just re-tested, and it works perfectly fine for me on C ROMs. What happens if you try starting up from your ESProFile a second time after getting the error 85? Does it give you another 85, or something different?
Logged

ried

  • Sr. Member
  • ****
  • Karma: +63/-0
  • Online Online
  • Posts: 300
Re: ESProFile - A Powerful ProFile/Widget Emulator and Diagnostic Tool
« Reply #81 on: November 14, 2025, 11:27:42 pm »

Error 85 every time. Neither unit loads Selector under any circumstances. They both show up in the boot menu, but instant Error 85 after being chosen to boot.
Logged

AlexTheCat123

  • Sr. Member
  • ****
  • Karma: +122/-1
  • Online Online
  • Posts: 420
Re: ESProFile - A Powerful ProFile/Widget Emulator and Diagnostic Tool
« Reply #82 on: November 15, 2025, 01:04:00 pm »

Interesting, I wonder why I can't reproduce it on my end? Other than you having Twiggies and me having a Sony drive, we should have the exact same configuration.

Do you have a logic analyzer you could hook up to the ProFile bus? Without that sort of data, I'm not sure how much further I can go given that I can't reproduce the problem.
Logged

ried

  • Sr. Member
  • ****
  • Karma: +63/-0
  • Online Online
  • Posts: 300
Re: ESProFile - A Powerful ProFile/Widget Emulator and Diagnostic Tool
« Reply #83 on: November 15, 2025, 01:47:42 pm »

I do not. I suppose this one will have to remain an unsolved mystery  :P
Logged

jamesdenton

  • Administrator
  • Sr. Member
  • *****
  • Karma: +81/-0
  • Offline Offline
  • Posts: 233
  • ArcaneByte
    • ArcaneByte
Re: ESProFile - A Powerful ProFile/Widget Emulator and Diagnostic Tool
« Reply #84 on: November 15, 2025, 06:20:41 pm »

I do not. I suppose this one will have to remain an unsolved mystery  :P

Is your ESProfile connected to the built-in parallel port or off a 2-port parallel card? Might be one variable to compare.
Logged

ried

  • Sr. Member
  • ****
  • Karma: +63/-0
  • Online Online
  • Posts: 300
Re: ESProFile - A Powerful ProFile/Widget Emulator and Diagnostic Tool
« Reply #85 on: November 15, 2025, 09:45:12 pm »

Always the same built-in parallel port.
Logged

stepleton

  • Hero Member
  • *****
  • Karma: +163/-1
  • Offline Offline
  • Posts: 535
Re: ESProFile - A Powerful ProFile/Widget Emulator and Diagnostic Tool
« Reply #86 on: November 16, 2025, 04:37:54 am »

One option would be for me to burn C ROMs and see what happens on my Lisa 1. Don't know if I have chips for that and it would probably be a while before I got round to it, but it could offer some insight.
Logged

AlexTheCat123

  • Sr. Member
  • ****
  • Karma: +122/-1
  • Online Online
  • Posts: 420
Re: ESProFile - A Powerful ProFile/Widget Emulator and Diagnostic Tool
« Reply #87 on: November 16, 2025, 12:01:06 pm »

One option would be for me to burn C ROMs and see what happens on my Lisa 1. Don't know if I have chips for that and it would probably be a while before I got round to it, but it could offer some insight.

If you ever get around to it, that would be great!
Logged
Pages: 1 ... 4 5 [6]   Go Up