[E3-hacking] Re: [E2 hacking] E2 monitor v0.22
Matt Evans
matt at axio.ms
Wed May 25 19:19:43 BST 2005
Evening Adam,
On 25 May 2005, at 19:00, Adam Coventry wrote:
> I have been lurking here for a little while and
> finally bought an E2 from ebay about a month ago
> (followed by a much cheaper one from a car boot
> sale!).
>
> I was very happy when I got pblq to work with my level
> shifter but unfortunately lost my splash screen (no
> big deal) when I tried out the Hello World example.
Hello welcome!
> Unfortunately, on downloading my monitor.pbl using
> pblq it looks as if my pbl has been trashed i.e. the
> E2 boots straight into the monitor's LCD debug console
> without the flashing lights of the pbl.
> Incidentally, I used "pblq writeflash monitor.pbl 0".
> So:
> is this a one-way trip for this E2 i.e. Monitor-only -
> no pbl possible, or is there some other path?
:-) That's what's supposed to happen. (It sounds like you see the
monitor message on the LCD, right? And you get serial port output?) I
think there's some confusion about what PBL is. There are two flash
chips; one is a NOR flash chip of 64K in which PBL lives. The other is
an 8MB NAND flash chip that PBL then accesses and loads the main OS
from (including the splash screen). The splash screen is the first
chunk in the NAND flash, offset zero. The rest of the OS appears to
live +1MB into the NAND, and the splash screen 'chains' onto the rest.
i.e. the boot sequence is:
1. CPU starts at phys addr. 0 where NOR flash is mapped, & executes PBL.
2. PBL trawls the NAND flash and finds a valid bootable block at 0.
(This is the splashscreen (or helloWorld, or monitor))
3. The block, the splashscreen, is loaded to RAM and executed and then
either it or PBL loads the next block in flash (the machine OS).
So what you have done is replaced the splash screen with the monitor
code; the machine boots and runs the monitor straight off instead of
the splash screen and the rest of the OS. I'm not sure if I understand
your question correctly - are you wondering whether it will
'dual-boot', i.e. if the monitor can then boot the main Amstrad OS? No
is the short answer - though it ought to be possible.
When you say "no pbl possible" what do you mean? PBL is still there -
it's what boots the monitor from NAND. If you want the splash screen
back you could reflash the first 2 blocks (16K) of NAND with the blocks
you backed up with pblq before reflashing ;-)
> Another mistake was that my 115200 is a little flaky
> and I meant to see if I could drop the monitor
> terminal speed a little before loading it.
Ahhh yep; well, you can download a replacement monitor into the monitor
you've already got running (if your serial is reliable enough to do
so). Edit uart.S:uart_init, there's a comment for some other baud rate
divisors. You can "put 100000" to XMODEM the resulting (blessed)
'monitor.pbl' into RAM, and then "flashwr 0 4000 100000" to reflash
over itself.
Glad to hear you got it working thus far, though! I've a newer version
of the monitor I'll upload tonight.
-Matt
More information about the e3-hacking
mailing list