megadrive_test1

annotate megadrive.ldscript @ 4:e7138066c7ea

started the vdp.h header, and hastily rewrote the VDP test as C code
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 01 Feb 2017 13:40:50 +0200
parents 9e7f64c4fe7a
children
rev   line source
nuclear@0 1 OUTPUT_ARCH(m68k)
nuclear@0 2
nuclear@0 3 MEMORY
nuclear@0 4 {
nuclear@0 5 rom : ORIGIN = 0x00000000, LENGTH = 0x00a00000
nuclear@0 6 ram : ORIGIN = 0x00ff0000, LENGTH = 0x00010000
nuclear@0 7 }
nuclear@0 8
nuclear@0 9 PROVIDE (_stacktop = 0x01000000);
nuclear@0 10
nuclear@0 11 SECTIONS {
nuclear@0 12 /* ---- start of ROM ---- */
nuclear@0 13 /* .vect section is used to place the m68k exception vectors at the
nuclear@0 14 * beginning of the address space
nuclear@0 15 */
nuclear@1 16 .vect : { * (.vect); } >rom
nuclear@0 17 /* .romhdr section is used to place the SEGA ROM header at 0x100 */
nuclear@0 18 . = 0x100;
nuclear@1 19 .romhdr : { * (.romhdr); } >rom
nuclear@0 20 .text : { * (.text); } >rom
nuclear@0 21 .rodata : { * (.rodata); } >rom
nuclear@0 22
nuclear@0 23 /* place the load address of the .data section after .rodata */
nuclear@3 24 . = ALIGN(4);
nuclear@0 25 _data_lma = .;
nuclear@0 26 _rom_end = _data_lma + _data_size;
nuclear@0 27
nuclear@0 28 /* ---- start of RAM ---- */
nuclear@0 29 . = 0xff0000;
nuclear@0 30 /* place the .data section at the start of RAM */
nuclear@3 31 .data ALIGN(4): AT (_data_lma) {
nuclear@0 32 _data_start = .;
nuclear@0 33 * (.data);
nuclear@3 34 . = ALIGN(4);
nuclear@0 35 _data_end = .;
nuclear@0 36 } >ram
nuclear@0 37 _data_size = SIZEOF(.data);
nuclear@0 38
nuclear@0 39 /* place the .bss section at the end */
nuclear@3 40 .bss ALIGN(4): {
nuclear@0 41 _bss_start = .;
nuclear@0 42 * (.bss);
nuclear@3 43 . = ALIGN(4);
nuclear@0 44 _bss_end = .;
nuclear@0 45 } >ram
nuclear@0 46 _bss_size = SIZEOF(.bss);
nuclear@0 47 }