At 4:58 the stackpointer initial value 0x103fffff is odd, it should be even (the first address beyond the actual stack memory) Also, why are you using a full 32 bit address for the SP, addresses are actually 24 bits on the 68k. Same quesstion for the GPIO address a few lines later (0x50000000)
Well I wanted to make sure that the stack pointer address was well within the memory range so that I was sure that I wasn't going past the memory range. However you are correct that I am using 32 bit addressing and I need to fix that. Subsequently I found that I have a floating pin and a bus error but I fixed those and I'm still having problems so I'll look at the code and make sure to changed everything to 24-bit addresses and hopefully that will solve my issues.
I expected that an out of range address like $50000000 would cause an bus error. But i tried it just on my home brew computer and it did not. And indeed, an uneven stackpointer will cause an address error. The first line after _start you're move a long but define a immediate value that is a word. How does the assembler interpretate that? Regarding to that odd reset behavior. I did not see a link to a schematic in the description, but the reset and hold line must be simultaneous activated for a reset.
@@meettechniek Out of range addresses aren't checked by the processor, the upper address byte is simply ignored (some old code used this byte for other purpose like tag bits), the processor just checks word and longword accesses for odd address and raises an address error in this case. OTOH, bus errors are signalled by *external* hardware to indicate an invalid address.
The bus error was the floating pin. I have fixed that issue. I am keen to get home and try the change to the memory mapping. I also think I need to change my MMIO mapping because I don't have the full 4megs as it is configured now. These comments and discussion has been super helpful for me!
At 4:58 the stackpointer initial value 0x103fffff is odd, it should be even (the first address beyond the actual stack memory) Also, why are you using a full 32 bit address for the SP, addresses are actually 24 bits on the 68k. Same quesstion for the GPIO address a few lines later (0x50000000)
Well I wanted to make sure that the stack pointer address was well within the memory range so that I was sure that I wasn't going past the memory range. However you are correct that I am using 32 bit addressing and I need to fix that. Subsequently I found that I have a floating pin and a bus error but I fixed those and I'm still having problems so I'll look at the code and make sure to changed everything to 24-bit addresses and hopefully that will solve my issues.
I expected that an out of range address like $50000000 would cause an bus error. But i tried it just on my home brew computer and it did not. And indeed, an uneven stackpointer will cause an address error.
The first line after _start you're move a long but define a immediate value that is a word. How does the assembler interpretate that?
Regarding to that odd reset behavior. I did not see a link to a schematic in the description, but the reset and hold line must be simultaneous activated for a reset.
@@meettechniek Out of range addresses aren't checked by the processor, the upper address byte is simply ignored (some old code used this byte for other purpose like tag bits), the processor just checks word and longword accesses for odd address and raises an address error in this case.
OTOH, bus errors are signalled by *external* hardware to indicate an invalid address.
The bus error was the floating pin. I have fixed that issue. I am keen to get home and try the change to the memory mapping. I also think I need to change my MMIO mapping because I don't have the full 4megs as it is configured now. These comments and discussion has been super helpful for me!
Yes the bus error was a floating pin, after I fixed that the problem went away. I need some change of address mapping for the MMIO.