Mac68k Forums

Home


Welcome, Guest
Guest Settings
Help

Mac68k Forums » Development » Software Hacking

Thread: 8MB ROM SIMM and EDisk driver


Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 27 - Pages: 2 [ 1 2 | Next ] - Last Post: Aug 10, 2014 11:39 PM Last Post By: bbraun Threads: [ Previous | Next ]
bbraun


Posts: 493
Registered: 7/25/12
8MB ROM SIMM and EDisk driver
Posted: Sep 26, 2012 8:01 PM
Click to report abuse...   Click to reply to this thread Reply
I got my 8MB ROM SIMMs today, so I started looking at the EDisk driver and the ability to do ROM Disks using that instead of my driver. The EDisk driver does a lot of different things, it's the Classic's ROM disk driver, it's the 040+ RAM Disk driver, and it's the driver for PC memory cards, AFAICT.
I didn't investigate the EDisk driver too much with the 2MB ROM SIMM, since most of the ROMs that have the EDisk driver are 1MB+, not leaving much space for a disk image.

When the EDisk driver is working on a ROM disk, it uses 24bit addressing mode, and it looks for the image header starting at the base of ROM (0x00800000 in 24bit mode) and going through 0x00DFFFFF. In 24bit addressing, 0x00900000 is the start of Slot 9's 1MB address space, continuing with each slot at 0x00X00000.
This works fine for the Classic, since the Classic doesn't have any slots, it can take over that address space without problem. But, this doesn't work at all for other machines.
The header contains offsets to the start and end of the disk image, but with 24bit addressing being used, we can't actually address the image (at all, since the ROM is 1MB, and that's all we've got for the ROM's 24bit address space).
I guess one solution would be to find a couple MB of unused 24bit address space, and setup the MMU to map the rest of ROM into it, figure out an unused portion of the 1MB ROM to place the EDisk header into, then set the offsets to point wherever we mapped the rest of ROM. I'm not sure that's practical, and if it was, if it'd be worthwhile.

Anyway, since I mentioned the possibility of using the EDisk driver earlier, I thought I'd share what I found.
dougg3

Posts: 190
Registered: 8/13/12
Re: 8MB ROM SIMM and EDisk driver
Posted: Sep 26, 2012 11:21 PM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
Ah rats, so the EDisk driver works in 24-bit mode. I guess they weren't clever enough to do the "temporarily switch over to 32-bit mode" hack you did in your ROM disk driver.

Sounds like your driver is definitely the way to go then!
bbraun


Posts: 493
Registered: 7/25/12
Re: 8MB ROM SIMM and EDisk driver
Posted: Sep 26, 2012 11:49 PM   in response to: dougg3 in response to: dougg3
Click to report abuse...   Click to reply to this thread Reply
Yeah, they're operating entirely in the 24bit address space, and even calling _StripAddress to enforce 24bit accesses, even when in 32bit mode. That works great if you've got the address space, but in most machines we don't. The Classic can steal address space from slots it doesn't have.
JDW

Posts: 8
Registered: 1/13/13
Re: 8MB ROM SIMM and EDisk driver
Posted: Jan 13, 2013 9:03 PM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
Gentlemen, please forgive me for not starting a new thread, but this seemed the most appropriately titled existing thread to continue my Q&A discussion on the 68kMLA.

To begin, please note that I have reviewed the information given on the following pages:
Custom ROMdisk Setup
ROM SIMM Programmer Downloads
ROM Boot Disk

Now to my questions:

1) In the information you've prepared for us, you suggest that we use Mini vMac to prepare the bootable System Folder disk image that we wish to have burned into the 8 MB ROM SIMM (which can be up to 7.5MB in size). But I assume we could use any existing System Folder we may already have stored on one of our Intel OS X Macs, correct? (I actually back up my SE/30's hard drive partitions to my Mountain Lion iMac, which is why I ask this question.)

2) In order to have the freedom to fiddle around on my own with custom System Folder configurations, I am seriously considering the purchase of a Programmer. Am I right in assuming that any problems currently known to be in the Programmer or ROM SIMM setup can be addressed by a programmer firmware update, as opposed to something that would require a Programmer hardware update? I ask this because I am located in Japan, and typically it's more expensive for me to ship or get something shipped to me than it is for those of you already there in the United States.

3) On your Custom ROMdisk Setup page, you say the following, "To create the appropriately sized disk image on OS X, Linux, or a UNIX-like system you can use the following commands:" What is this referring to, exactly? And in what program are these commands to be entered?

4) In your experience in testing the 8MB ROM over the past few weeks, have you discovered any compatibility pitfalls that we should be aware of? I myself am specifically thinking about the SE/30. On one of my SE/30's I have a DiiMO 50MHz 030 accelerator board fitted into the PDS slot. On another I have an Artmix TS Adapter in combination with a 40MHz 040 DayStar accelerator board. I also have an Xceed Grayscale kit setup. All of these different add-on configurations seem to play just fine with an Apple IIsi ROM SIMM, so I would assume that a custom-made 8MB ROM SIMM based on the IIsi SIMM should work just fine with these hardware add-ons. What do you think?

5) Even though this 8MB SIMM is being called a ROM for clarity's sake, it is not in fact a Read Only Memory but instead a Flash memory that we can repeatedly write and re-write data to reliably many thousand of times, correct?

6) It has be mentioned by bbraun that the holding down of the "r" key upon booting the Mac will write the contents of the System Folder on the ROM into the Mac's RAM, in the form of a RAM Disk. I assume this means that the RAM Disk would work just like any other RAM disk? Meaning, we can mount it on the desktop, delete files off of it, write files to it, etc.? And then after we make changes to that RAM disk we can reboot into that modified RAM Disk, which will remain in RAM until power is switched off? (By the way, which is faster: booting from the RAM disk or booting from the ROM Disk?)

7) Does the 8MB ROM SIMM draw a lot more current than the stock ROM from Apple? I am thinking about how the logic board's are designed, with regard to the amount of capacitance used on the logic board. Putting my question another way, if the 8MB SIMM's draw a lot more current, could it be possible that that excessive power draw could cause certain glitches in operation (e.g., unexplained crashes or freezes)? (In my case, I am especially thinking about the SE/30 motherboard, and in cases or I may have added hardware add-ons that also tax the logic board caps a bit).

Sorry for the many questions, but I just wanted to be thorough. Perhaps you could later add them into a comprehensive FAQ.

Thank you.

bbraun


Posts: 493
Registered: 7/25/12
Re: 8MB ROM SIMM and EDisk driver
Posted: Jan 13, 2013 9:41 PM   in response to: JDW in response to: JDW
Click to report abuse...   Click to reply to this thread Reply
Yeah, sorry about the topic. We ended up doing a lot of the ROM Disk driver discussion in the DeclROM patching and ROM booting , which originally started with some of my experiments with DeclROMs and moved more into the ROM booting area. This is fine though, the forums are low enough volume it doesn't really matter.

JDW wrote:
1) In the information you've prepared for us, you suggest that we use Mini vMac to prepare the bootable System Folder disk image that we wish to have burned into the 8 MB ROM SIMM (which can be up to 7.5MB in size). But I assume we could use any existing System Folder we may already have stored on one of our Intel OS X Macs, correct? (I actually back up my SE/30's hard drive partitions to my Mountain Lion iMac, which is why I ask this question.)

That is correct. The disk image you prepare (that 7.5MB) will appear as a "disk" or volume to the OS. You can put whatever you want on it. A System Folder is just required for it to be bootable.

I'm going to leave question #2 for dougg3.

3) On your Custom ROMdisk Setup page, you say the following, "To create the appropriately sized disk image on OS X, Linux, or a UNIX-like system you can use the following commands:" What is this referring to, exactly? And in what program are these commands to be entered?

Those commands are intended to be entered at the command line, such as through Terminal.app on OS X. I have included pre-made blank images to avoid needing to use the 'dd' command, although I'm not aware of a graphical alternative to the 'cat' command.

4) In your experience in testing the 8MB ROM over the past few weeks, have you discovered any compatibility pitfalls that we should be aware of? I myself am specifically thinking about the SE/30. On one of my SE/30's I have a DiiMO 50MHz 030 accelerator board fitted into the PDS slot. On another I have an Artmix TS Adapter in combination with a 40MHz 040 DayStar accelerator board. I also have an Xceed Grayscale kit setup. All of these different add-on configurations seem to play just fine with an Apple IIsi ROM SIMM, so I would assume that a custom-made 8MB ROM SIMM based on the IIsi SIMM should work just fine with these hardware add-ons. What do you think?

I have used the 8MB ROM in an SE/30 although I do not have any accelerators. We do know from other reports that the Daystar accelerators in particular (this may apply to others as well) seem to be attached to specific ROMs. They maintain a table of ROM checksums and presumably perform runtime patching of the ROM. This is inherently worrisome, but whether it actually poses a problem, and under what circumstances isn't really known. In the modified ROM that I distribute, I have disabled the internal checksum verification, allowing the checksum field to remain stock. This will allow the accelerator to match the checksum against its list of known and supported ROMs, but beyond that the interaction of the accelerator with our ROM modifications is unknown. The only thing I can think of that might be an issue is we have modified the MMU mappings to allow use of the full 8MB (the stock IIsi ROM only maps in 1MB of ROM). But, I don't have an accelerator to test with, so I really don't know if there is an issue or not.

5) Even though this 8MB SIMM is being called a ROM for clarity's sake, it is not in fact a Read Only Memory but instead a Flash memory that we can repeatedly write and re-write data to reliably many thousand of times, correct?

Correct. However, it is not writeable or flashable or otherwise modifiable by the Macintosh. It's only really modifiable in the programmer. But you can reprogram it many, many times. During the course of development, I have probably reprogrammed mine many hundreds of times.

6) It has be mentioned by bbraun that the holding down of the "r" key upon booting the Mac will write the contents of the System Folder on the ROM into the Mac's RAM, in the form of a RAM Disk. I assume this means that the RAM Disk would work just like any other RAM disk? Meaning, we can mount it on the desktop, delete files off of it, write files to it, etc.? And then after we make changes to that RAM disk we can reboot into that modified RAM Disk, which will remain in RAM until power is switched off? (By the way, which is faster: booting from the RAM disk or booting from the ROM Disk?)

The behavior of the ROM Disk driver (as it stands now, software is never "done", only abandoned) is you hold down 'r' to boot from ROM. This will result in a locked volume on boot. If you hold down 'r' and 'a' on boot, the contents of the disk image stored in ROM will be copied to RAM. The system will actually boot from the data in ROM, and then after the "Welcome to Macintosh" screen and before the desktop is displayed, the disk image will be copied from ROM into RAM. When booting with 'r' and 'a' held down, you'll notice a delay at this stage, and the delay is that memory copy.
Modifications to the RAM disk will not survive reboots. The Apple disk driver allocates memory differently than my ROM Disk driver, and I honestly have simply not figured out how to accomplish what they are doing (what they do involves modifications to the system in several locations). Perhaps the driver can be changed at some point in the future to do what the EDisk driver does, but for now it does not.
As far as which is faster, ROM and RAM operate at the same speed in the SE/30 so those access times are identical. However, the way the driver is implemented, RAM accesses will be slightly faster. Although you pay a penalty for the initial copy of the entire disk image during the boot process.

7) Does the 8MB ROM SIMM draw a lot more current than the stock ROM from Apple? I am thinking about how the logic board's are designed, with regard to the amount of capacitance used on the logic board. Putting my question another way, if the 8MB SIMM's draw a lot more current, could it be possible that that excessive power draw could cause certain glitches in operation (e.g., unexplained crashes or freezes)? (In my case, I am especially thinking about the SE/30 motherboard, and in cases or I may have added hardware add-ons that also tax the logic board caps a bit).

I can't answer that authoritatively, but my feeling is the 8MB SIMM probably draws less power than the stock ROM.
dougg3

Posts: 190
Registered: 8/13/12
Re: 8MB ROM SIMM and EDisk driver
Posted: Jan 13, 2013 9:43 PM   in response to: JDW in response to: JDW
Click to report abuse...   Click to reply to this thread Reply
Hey there JDW! I'll address the questions I know how to answer:

1) You could probably use any system folder you want as long as it fits in 7.5 MB. You'll still need to get it into the disk image somehow, so it would take setting up Mini vMac or Basilisk II or something like that. I personally am not aware of how to get it from OS X directly to Mini vMac -- hopefully someone else can answer that one reliably.

2) I can't make any guarantees, but the hardware is pretty well known to work. I haven't had to fix anyone's hardware yet. When the programmer board first comes up, it always jumps into the bootloader which I don't ever erase. In other words, the programmer board is unbrickable. If a firmware update fails halfway through, the bootloader will still be there and you can reflash the firmware again. The only problem I'm aware of on Intel Macs and Windows is occasionally the programmer board quits responding and you either have to unplug/replug the board and/or restart the programmer software. This is a software issue as far as I can tell, and it's not a really huge deal anyway (although I still want to track the problem down and completely fix it)

3) The commands listed on the wiki are commands you could enter in your Terminal window. The other option would be to download one of the premade images of the correct size.

4) Compatibility with upgrade cards is a definite question mark. I know for a fact that the Daystar 040 card maps itself into an additional 128 KB of the available 7.5 MB. That alone will make it incompatible with the current 7.5 MB ROM disk driver. The Turbo 040 card also patches the ROM. Since bbraun's work also patches the ROM, there is a definite possibility that it won't be compatible. If that's going to be a problem I will probably have to suggest not doing the ROM disk thing--you'll have a much better chance of success if you just stick with more of a standard system.

5) It's being called a ROM from the perspective of the Mac because the Mac does not have the ability to write to it. So you can't modify the image while it's inside the Mac. It appears read-only, or you can boot with the R+A keys held down to make it generate a RAM disk to use. (of course, the RAM disk contents will not be saved when you reboot or power off). From the perspective of being able to reflash it with a new ROM image whenever you want using the SIMM programmer board, yes -- the chips are flash chips rated for 100,000 program/erase cycles.

6) You can move things around, create/delete files, etc. in the RAM disk if you boot with R+A held down. The RAM disk contents are deleted after a reboot, so you can't reboot into the RAM disk. I'm not sure if it's possible to do it any other way - bbraun would have to chime in for details on that. I suspect it's not possible or too difficult to consider possible because of the difficulties with 24-bit versus 32-bit mode when the system is first booting, along with problems in the past that he overcame by delaying the RAM disk allocation until just before the Finder loads.

7) This is a good question, and I don't know the answer to be honest. I haven't heard of anyone having problems yet. My initial guess is that the newer chips are more power efficient than what they used back then, but I can't answer that with 100% certainty. What I can tell you is that chips on the 8 MB SIMM draw a maximum of 20 mA of current while reading according to their datasheet, and there are four of them, so the SIMM probably draws no more than 80 mA total, unless you have to factor in the bypass capacitors (I'm not sure on that). It would be interesting for someone to compare the current draw, but it might be hard to measure without hacking the SIMM to put an ammeter in series. I highly doubt it's going to be very different from the stock chips though. Anyone with more electronics experience feel like chiming in with their thoughts on this one?

Hope that helps a little bit, and good questions! I agree with the idea of doing a FAQ, it would be nice to have answers to these types of questions.
bbraun


Posts: 493
Registered: 7/25/12
Re: 8MB ROM SIMM and EDisk driver
Posted: Jan 13, 2013 11:50 PM   in response to: dougg3 in response to: dougg3
Click to report abuse...   Click to reply to this thread Reply
I've added a FAQ. Everyone here should be able to modify it, so please feel free to add questions, etc.
JDW

Posts: 8
Registered: 1/13/13
Re: 8MB ROM SIMM and EDisk driver
Posted: Jan 14, 2013 2:26 AM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
bbraun and Doug, thank you both for your very detailed and helpful replies.

I see the following statement in the new FAQ:

It is known that the Daystar Turbo 040 maps its ROM into the $40880000 to $408A0000 address range, which will conflict with the beginning of the ROM disk image.

You are defining the "ROM Disk image" as that 7.5MB of space we use to store our files (bootable System Folder, etc.), correct? If so, would it not then be feasible to keep the ROM Disk image out of that address range, which would of course reduce the available size to something less than 7.5MB?

I've used a IIfx and a IIsi ROM in my SE/30, in addition to my SE/30's stock ROM of course, and I've not had any problem when my DiiMO PDS accelerator is installed at the same time. My 40MHz 040 Daystar also works with the IIfx or IIsi ROMs, but you lose read/write capability to 1.4MB floppies (problem goes away if you put the stock SE/30 ROM back in, or remove the Daystar card). Anyway, because the IIfx & IIsi ROMs are 512k each in size (the SE/30's ROM is 256k), I assume that means the "$40880000 to $408A0000 address range" you spoke of immediately follows the initial 512k of ROM space?
dougg3

Posts: 190
Registered: 8/13/12
Re: 8MB ROM SIMM and EDisk driver
Posted: Jan 14, 2013 9:56 AM   in response to: JDW in response to: JDW
Click to report abuse...   Click to reply to this thread Reply
You are defining the "ROM Disk image" as that 7.5MB of space we use to store our files (bootable System Folder, etc.), correct? If so, would it not then be feasible to keep the ROM Disk image out of that address range, which would of course reduce the available size to something less than 7.5MB?

Hey JDW,

Exactly. So the answer there would be to shrink the ROM disk so it's 7.375 MB and append it to the end of the Daystar ROM. As long as the Daystar ROM does not repeat itself in later positions in ROM space where the disk image goes, that would probably do the trick. It would also require a small change to the ROM disk driver to tell it where to look instead (and that the disk is slightly smaller).

I've used a IIfx and a IIsi ROM in my SE/30, in addition to my SE/30's stock ROM of course, and I've not had any problem when my DiiMO PDS accelerator is installed at the same time. My 40MHz 040 Daystar also works with the IIfx or IIsi ROMs, but you lose read/write capability to 1.4MB floppies (problem goes away if you put the stock SE/30 ROM back in, or remove the Daystar card). Anyway, because the IIfx & IIsi ROMs are 512k each in size (the SE/30's ROM is 256k), I assume that means the "$40880000 to $408A0000 address range" you spoke of immediately follows the initial 512k of ROM space?

That's good to know that the SE/30 still (mostly) works with accelerators you've tested even when it has a IIsi or IIfx ROM. You're exactly right -- the IIsi/IIfx/IIci ROM will appear from $40800000 to $40880000. The Daystar ROM, at least in a IIci, will appear directly after that from $40880000 to $408A0000. Everything after that should be fair game as long as the Daystar ROM does not repeat itself. I don't know for sure whether it does or not.

The other thing I know is that the Daystar ROM disables the ROM checksum routine by always forcing it to return success at the end of the routine. bbraun patches that same routine at the beginning and has previously used the rest of the remaining space for other purposes. If he uses the same space near the end that the Daystar ROM patches, that might pose another conflict. I can probably check for sure later if I still have the diff of what the Daystar card changes in the stock ROM.
tt


Posts: 144
Registered: 8/25/12
Re: 8MB ROM SIMM and EDisk driver
Posted: Jan 15, 2013 1:54 AM   in response to: dougg3 in response to: dougg3
Click to report abuse...   Click to reply to this thread Reply
Hey JDW, I have the programmer, 8MB SIMM, SE/30, and various accelerators (DayStar/Diimo) if you guys need help with testing in advance. I am also interested in compatibility, but I have just been super busy lately to do testing. I am guessing '030 accelerators should have no problems since I do not think they really patch the ROM like the '040 types.
JDW

Posts: 8
Registered: 1/13/13
Re: 8MB ROM SIMM and EDisk driver
Posted: Jan 15, 2013 4:02 PM   in response to: tt in response to: tt
Click to report abuse...   Click to reply to this thread Reply
I must admit that I am quite curious exactly how Daystar patches the ROM in light of the fact that you lose Read/Write capability to 1.4MB floppies when a IIsi (512k)or IIfx ROM (512k) is used in an SE/30 instead of the stock SE/30 (256k) ROM. (There are no problems reading and writing to 1.4MB floppies in an SE/30 when the stock SE/30 ROM is used in combination with the Daystar accelerator.)

It could certainly be that this ROM conflict originates from something other than the DayStar ROM patch. But if so, then what in the world could originate from? This thread has gotten me thinking that the 1.4MB floppy problem very well could be related to how the Daystar accelerators patch the ROM. If indeed the Daystar accelerator patches the ROM immediately following the first 512k of space in the ROM, then by logical deduction I would assume that there should be no 1.4MB floppy disk problem when using a 512k IIsi or IIfx ROM. But since in my testing I have confirmed without a doubt that there is a Read/Write problem when a 512k ROM is used in the SE/30, I am wondering if the Daystar accelerators are in fact patching in a way that is different from what we are "assuming."

What do you think?
bbraun


Posts: 493
Registered: 7/25/12
Re: 8MB ROM SIMM and EDisk driver
Posted: Jan 16, 2013 12:28 AM   in response to: JDW in response to: JDW
Click to report abuse...   Click to reply to this thread Reply
For those interested, I've checked in a dump of a Turbo040 ROM, and the beginnings of a disassembly of it.
Hosted svn repositories here and the howto for disassemblies.

I believe what it is doing is it gets run before the system ROM, it figures out what system ROM it has, then sets things up as it sees fit before eventually jumping into the system ROM. I'm still working my way through the details though. It looks like a long slog.
JDW

Posts: 8
Registered: 1/13/13
Re: 8MB ROM SIMM and EDisk driver
Posted: Jan 17, 2013 4:52 PM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
bbraun, would it help the development effort if I were to ship you or Doug my Turbo 40 card and Artmix TS Adapter for the SE/30? If not, then is there anything tt can test for you, since he has the same cards I do (Turbo 040 & DiiMO) plus the 8MB SIMM and programmer?

My excitement about the development of this 8MB ROM stems not only from the fact we can have a superfast System Folder in ROM (and can theoretically run up to OS 8.1 on the SE/30), but also because this custom ROM opens the door to the possibility of fixing the Daystar accelerator 1.4 MB floppy Read/Write problem (which I have confirmed exists on the SE/30, and may also exist on other vintage Macs two when a non-stock ROM is used).

Thanks.
bbraun


Posts: 493
Registered: 7/25/12
Re: 8MB ROM SIMM and EDisk driver
Posted: Jan 17, 2013 5:08 PM   in response to: JDW in response to: JDW
Click to report abuse...   Click to reply to this thread Reply
Thanks JDW. I'm not terribly comfortable borrowing someone's accelerator for this, I just don't want anything to happen to it. There is one test I have in mind, if you (or tt) wouldn't mind running with just a stock Daystar config.
I'm curious if you can write to the address space that is normally occupied by ROM. As in, I'm curious if the Daystar is copying the system ROM into RAM, and then modifying the RAM copy, and putting the copy where the system ROM is normally expected.
To determine this, I could write a program if you're more comfortable with that, but it can also be determined from macsbug and probably microbug (the default in-rom debugger) as well.
From a system booted with the Daystar installed, press the NMI button (if you've got the programmer's switch installed), and it should drop you to macsbug if you've got that installed, or to microbug if not.
The command "dm 40800000" should show something like "9722 1136 4080 002a ..."
Then issue "sw 40800000 aaaa" This will Set Word 0xAAAA into address 0x40800000.
Then "dm 40800000" again and see if the memory displayed there is any different. If it is unchanged or the 'sw' command failed in some way, I'm not sure we learned much. If it did change, then I think we just learned that the Daystar is using RAM to modify the ROM.
I'll keep my eyes out for a Turbo040 and might pick one up sometime. Accelerators aren't really my thing, but I'm starting to be intrigued by the technical aspects of the Daystar.
tt


Posts: 144
Registered: 8/25/12
Re: 8MB ROM SIMM and EDisk driver
Posted: Jan 20, 2013 10:41 PM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
I tried the commands and it seemed to not change the contents of that address. I used a Daystar 040, stock SE/30 ROM, and the built-in debugger. I did not have Mode32 installed if that makes a difference. I could not get the custom ROMs to boot with the 040. They may not have the proper checksum the Turbo is expecting... the machine acts like the ROM is not there at all.

Point your RSS reader here for a feed of the latest messages in all forums