[NTLK] A new ROM board
m.melcher at robowerk.de
Thu Mar 17 05:26:16 PDT 2022
> On 16. Mar 2022, at 21:58, DXH <dxh at woh.rr.com> wrote:
> Hi Matthias,
>> By now, I fully tested adding 8MB of additional packages in that first block. With a dedicated programmer, that can be done now. I am writing software that will enable this feature for everyone.
> By this you mean you the programmer functionality would now be on the Newton?
Yes. I am very confident that I can implement that for the ROM Extensions. Making the OS itself programmable is quite hard.
> So, installing a package could progress as normal and load to internal flash or be directed to the Rom Flash?
> How do you envisage the software working?
Yes. NewtonOS runs packages "in place". When installing, the package is modified so that all address references appear at their final position. Other than that, the .pkg file is pretty much just moved to that point in memory.
Flash chips have a tiny CPU inside them. You program them by sending them command sequences to certain addresses. NetwonOS does not allow sending data to a ROM. The hardware however allows that, and since we have to flash the ROM anyway, we can modify the ROM slightly, creating a back door that allows us to disable the MMU and giving us unsupervised access to _everything_ (muhahahaha).
There is the issue that the Rex is 8MB, but we only have half an MB of RAM available on MP2000. So we must either stream data in through the serial port or wifi, or use a PCMCIA card as an intermediate store. And this is where the problem lies for updating the ROM itself. We obviously can't update the OS while the OS is running, so wifi is a no-go. Serial port may or may not work bby addressing the hardware directly, but at least the PCMCIA memory can be easily accessed from machine code that runs without an OS present.
The original idea of bank switching would have solved all this, but I still have no idea on how to implement that sensibly.
BTW: I updated the PCB layout for the ROM boards a tiny bit, adding actual parts for the capacitor spots, and moving traces away from the metal spring that holds the PCB.
>> So we know how to address 8+8+16MB=32MB of the card. The hardware interface of the card has an additional address pin, which appears very much like an afterthought. It's not used by the OS, but it is very much addressable by the CPU, so we actually have an additional 32MB of memory available. I am not sure if that can be used easily for anything, but it's there nevertheless.
> Are you able to access it on the Newton with suitable software? As the OS doesn’t see it, perhaps that would be a handy place to park alternate firmware and issue a command ( if possible) to swap in the alternate?
I would need to generate some signal to allow bank switching. In the end, it's just inverting a single address line (xor gate). But I need to be able to control that via software, and the setting must be persistent through power loss, or the NewtonOS will erase all data every time the power is cut, and the alternative ROM bank is switched out. There is enough memory to switch between four banks of 32MB Flash each btw. . I would love to get such a feature in before having the next batch manufactured.
Maybe an ATTiny on the ROM bard that listens for patterns on the data bus?
> Also, if you are developing software to let the casual user program the Flash ROM from their device, it kinda obviates the need for an external programmer therefore, I will drop my request for an LCD interface. You have better things to do with your time.
We have now 6 programmers in the wild. If we decide that we need more programmers out there, we should do a redesign anyway. I will try to keep a list of ideas in the GitHub Wiki. Leaving room for an LCD and button is really easy then.
> This project looks to shaping up really well. Excellent work!
Thanks, PCBman. It's great fun. And thanks for all the support by you and the other beta testers.
More information about the NewtonTalk