-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
873f085
commit f77b725
Showing
8 changed files
with
193 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
Fuzix test for the P90MB | ||
|
||
This assumes the 'RetroDOS' ROM is being used for now | ||
|
||
TODO | ||
- Loader | ||
- Serial baud rate setting | ||
- I2C | ||
- UART 2 stop bits via mode 3 ? | ||
- Interrupt testing (emulator doesn't yet handle interrupts) | ||
- I2C | ||
- External devices ? | ||
- Watchdog | ||
|
||
Longer Term | ||
- Play with soft control of upper address bits and buddy allocator | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* We are loaded somewhere out of the memory window and run | ||
* Our stack is a C call stack of the form | ||
* | ||
* bootloader(uint8_t bootdev, uint8_t *base, uint32_t len, syscallvec) | ||
* | ||
* Needs to bne relocatable. | ||
*/ | ||
.globl start | ||
.globl loader | ||
|
||
.mri 1 | ||
|
||
/* We load the binary into the memory space RetroDOS provided. We will then | ||
relocate it once we are ready to dump RetroDOS overboard */ | ||
|
||
ascii "RETRODOSBOOT68" | ||
loader: | ||
lea.l syscb(pc),a0 | ||
move.l 4(sp),4(a0) ; drive | ||
move.l 8(sp),8(a0) ; load address | ||
|
||
move.l 16(sp),a4 ; syscall vector | ||
|
||
move.l a0,-(sp) | ||
jsr (a4) ; C call into disk loader | ||
addq #4,sp | ||
|
||
/* Now dump RetroDOS and run it. This assumes we move the image down which | ||
happens to be a safe bet but we ought to check and do either direction */ | ||
|
||
move.l 8(sp),a0 | ||
move.l #$0400,a1 | ||
move.w #$3FFF,d0 ; 64K | ||
|
||
copy: | ||
move.l (a0)+,(a1)+ | ||
dbra d0,copy | ||
|
||
jmp $0400 | ||
|
||
syscb: | ||
long $F1 ; raw read | ||
cbdrive: | ||
long 0 ; drive | ||
cbaddr: | ||
long 0 ; buffer | ||
long 1 ; LBA | ||
long 128 ; length (64K for now) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
OUTPUT_ARCH(m68k) | ||
|
||
SEARCH_DIR(.) | ||
|
||
MEMORY | ||
{ | ||
ram (rwx) : ORIGIN = 0x15000, LENGTH = 0x200 | ||
} | ||
|
||
/* | ||
* stick everything in ram (of course) | ||
*/ | ||
SECTIONS | ||
{ | ||
.text : | ||
{ | ||
CREATE_OBJECT_SYMBOLS | ||
*(.text .text.*) | ||
|
||
. = ALIGN(0x4); | ||
/* These are for running static constructors and destructors under ELF. */ | ||
KEEP (*crtbegin.o(.ctors)) | ||
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) | ||
KEEP (*(SORT(.ctors.*))) | ||
KEEP (*(.ctors)) | ||
KEEP (*crtbegin.o(.dtors)) | ||
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) | ||
KEEP (*(SORT(.dtors.*))) | ||
KEEP (*(.dtors)) | ||
|
||
*(.rodata .rodata.*) | ||
|
||
. = ALIGN(0x4); | ||
*(.gcc_except_table) | ||
|
||
. = ALIGN(0x4); | ||
*(.eh_frame) | ||
|
||
. = ALIGN(0x4); | ||
__INIT_SECTION__ = . ; | ||
LONG (0x4e560000) /* linkw %fp,#0 */ | ||
*(.init) | ||
SHORT (0x4e5e) /* unlk %fp */ | ||
SHORT (0x4e75) /* rts */ | ||
|
||
. = ALIGN(0x4); | ||
__FINI_SECTION__ = . ; | ||
LONG (0x4e560000) /* linkw %fp,#0 */ | ||
*(.fini) | ||
SHORT (0x4e5e) /* unlk %fp */ | ||
SHORT (0x4e75) /* rts */ | ||
|
||
. = ALIGN(0x4); | ||
_etext = .; | ||
*(.lit) | ||
} > ram | ||
|
||
.data : | ||
{ | ||
*(.got.plt) *(.got) | ||
*(.shdata) | ||
*(.data .data.*) | ||
_edata = .; | ||
} > ram | ||
|
||
.bss : | ||
{ | ||
. = ALIGN(0x4); | ||
__bss_start = . ; | ||
*(.shbss) | ||
*(.bss .bss.*) | ||
*(COMMON) | ||
_end = ALIGN (0x8); | ||
__end = _end; | ||
} > ram | ||
|
||
.stab 0 (NOLOAD) : | ||
{ | ||
*(.stab) | ||
} | ||
|
||
.stabstr 0 (NOLOAD) : | ||
{ | ||
*(.stabstr) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters