LisaList2

Advanced search  

News:

Want an XLerator? Please participate in the market research thread: https://lisalist2.com/index.php/topic,594.msg4180.html

Pages: [1]   Go Down

Author Topic: Skipping the Lengthy ProFile Initialization Routine under MacWorks Plus II  (Read 5926 times)

AlexTheCat123

  • Sr. Member
  • ****
  • Karma: +85/-1
  • Offline Offline
  • Posts: 308

I was messing around with a 2GB drive image under MW+II on my ESProFile the other day, and quickly ran into a roadblock when I discovered how long it would take to format the disk. Like on the order of a day and a half. According to some info from @sigma7, MacWorks uses the OS driver to perform the format, and the driver insists on zeroing every block on the drive, which I was luckily able to find a way around. I'm not sure how useful this will be to people, but I think it's nice to document regardless!


Note that this only works under MacWorks Plus II version 2.5.3 (the version from 2011). The patch is probably identical in other versions, but the address at which the breakpoint should be set is likely to be a bit different.


Go ahead and boot from the MW+II installer floppy, make sure you have MacsBug installed, and then open the MW+II install app and start the formatter. Once you see the activity light on your drive blinking away, enter MacsBug and set a breakpoint at address $41CB2C by typing:
Code: [Select]
BR 41CB2CThen hit "g" to resume execution, and you should be thrown back into MacsBug in a moment once we reach the breakpoint. We don't need it anymore, so clear the breakpoint by typing:
Code: [Select]
BRCWe set our breakpoint on a TST.W D0 instruction that compares the value in D0 with 0 and sets all the bits in the condition code register accordingly. When we still have blocks left to format, D0 will be equal to 1 at this point. The next instruction is a BNE, so the branch will normally be taken when we're still in the middle of the format. But in order to stop the format early, we simply need to set D0 to 0 here, so that the TST instruction results in the BNE not being taken and us dropping out of the formatter. To do this, simply type:
Code: [Select]
D0 = 0Then hit "g" to continue execution. You should soon see the screen change to say that it's installing MacWorks and initializing a filesystem on the volume, and everything should be done within about 30 seconds!


Note that your disk image should be filled with all zeros before you try any of this, because Mac OS will get mad if it finds any blocks where there's garbage data and the checksums don't match after it supposedly performed a format operation.


As I said, this is only really useful if you have a large disk that would take forever to format, but hopefully at least one other person will find it useful at some point!
Logged
Pages: [1]   Go Up