I've long been confused why in lisaem, installing MacWorks XL to the Profile does not result in a bootable setup - you still have to use a floppy. This is even noted in LisaEm_Users_Guide_1.2.5.pdf – attempting to boot from the Profile after installation results in an error 75 (from the ROM).
So I spent the better part of the day looking into this... I copied over the first 8 blocks from the image to a new empty image, set the AA AA... boot tags, and immediately got an error 23.

This is an interesting error, as it comes from the bootsector (the first block copied). It indicates there was some sort of disk reading error. In this case, because I had failed to set the checksum tag for the sectors. I corrected that and it immediately goes back to error 75. Error 75 is interesting as its originating from the ROM, and implies an error occurred after passing control off to the bootsector.
EBOOT .EQU 75 ;general boot failure error codeI captured a trace in lisaem of the boot process, and prior to it going back into the ROM I could see it executing from 0x20a00: This is where the secondary stage bootloader gets loaded from the bootsector. Clearly the bootsector has done its job, it loaded in the subsequent blocks from disk and jumped over to them. But the instructions in 0x20a00 don't match what are on disk. It turns out the first sector was just read in 8 times in a row.
Looking at the trace logs confirmed this, the Profile was only sending back data from the first sector. Clearly the read command's block number wasn't being parsed correctly. It seems to boil down to these two instructions in the bootsector:
COPYSIX MOVE.B (A1), NHS(A0) ; NHS = 0x78 = PORTA2
MOVE.B (A1)+, ORA(A0) ; ORA = 0x08 = ORA2
Consulting the boot rom sources:
ORA2 .EQU $8 ;PORT A OUTPUT REG
PORTA2 .EQU $78 ;PORT A WITH NO HANDSHAKE
So it seems to be writing the same profile command data twice to port A (once with a handshake, and once without). This seems to confuse lisaem:
src/storage/profile.c:ProfileLoop:991:Wrote CMD 00 into ProFile Data block index:4| 20:52:31.7 52544879
src/storage/profile.c:ProfileLoop:992:Wrote MSB 00 into ProFile Data block index:5| 20:52:31.7 52544895
src/storage/profile.c:ProfileLoop:993:Wrote mid 00 into ProFile Data block index:6| 20:52:31.7 52544941
src/storage/profile.c:ProfileLoop:994:Wrote LSB 00 into ProFile Data block index:7| 20:52:31.7 52544987
src/storage/profile.c:ProfileLoop:995:Wrote RTRY 03 into ProFile Data block index:8| 20:52:31.7 52545017
src/storage/profile.c:ProfileLoop:996:Wrote SPAR 03 into ProFile Data block index:9| 20:52:31.7 52545033
src/storage/profile.c:ProfileLoop:998:Wrote ? ? ? ? 0a into ProFile Data block index:10| 20:52:31.7 52545063
src/storage/profile.c:ProfileLoop:998:Wrote ? ? ? ? 0a into ProFile Data block index:11| 20:52:31.7 52545079
src/storage/profile.c:ProfileLoop:998:Wrote ? ? ? ? 04 into ProFile Data block index:12| 20:52:31.7 52545109
src/storage/profile.c:ProfileLoop:998:Wrote ? ? ? ? 04 into ProFile Data block index:13| 20:52:31.7 52545125
Can clearly see 03, 0a and 04 duplicated – the 00s are as well, but those are less clear. 04 should be the threshold, 0a should be the retry count, 03 should be the block number.
The two writes to the VIA are getting duplicated on lisaem's profile side of things, resulting it in never seeing the block number where it expects.
NOP'ing out the first of the two moves (the second being more important for its incrementing of a1) results in MacWorks XL booting directly from the Profile image in lisaem. I've attached a disk image containing that NOP patch for others to verify.
With this issue finally understood, I can get back to the important work of making a Profile bootable Monitor system.