TeoT Alpha has just been released for the neogeo

Also introducing ngDataLinker a little tool and method to use bank switching using NEODEV :
https://github.com/ozzyyzzo4096/ngDataLinker
Enjoy

//Bank 0
<setup>
<starting_tile fillmode="dummy">256</starting_tile>
<charfile>out\bk0Char.bin</charfile>
<mapfile>out\bk0Maps.s</mapfile>
<palfile>out\bk0Pals.s</palfile>
<incfile>out\bk0Include.h</incfile>
</setup>
//Bank 1
<setup>
<starting_tile fillmode="none">65536</starting_tile>
<charfile>out\bk1Char.bin</charfile>
<mapfile>out\bk1Maps.s</mapfile>
<palfile>out\bk1Pals.s</palfile>
<incfile>out\bk1Include.h</incfile>
</setup>
//Bank2
<setup>
<starting_tile fillmode="none">131072</starting_tile>
<charfile>out\bk2Char.bin</charfile>
<mapfile>out\bk2Maps.s</mapfile>
<palfile>out\bk2Pals.s</palfile>
<incfile>out\bk2Include.h</incfile>
</setup>
//Bank 3
<setup>
<starting_tile fillmode="none">196608</starting_tile>
<charfile>out\bk3Char.bin</charfile>
<mapfile>out\bk3Maps.s</mapfile>
<palfile>out\bk3Pals.s</palfile>
<incfile>out\bk3Include.h</incfile>
</setup>
#ifndef __BANK0GFX_H__
#define __BANK0GFX_H__
#define BoxOrange 0x0020458e
#define Mission1 0x00200160
#define GD_Explosion_Palettes 0x002441fe
#define BoxBrown 0x00204624
#define BoxPurple_Palettes 0x00243e8c
#define BoxYellow 0x002045ac
#define Bios_Palettes 0x00243dc0
#define GD_Explosion 0x00242f46
#define BoxPink 0x00204642
#define Bullet1_Palettes 0x002441bc
#define TM_00177 0x0021d80a
#define Bullet1 0x002425c8
#define BoxRed 0x00204660
#define Bios 0x00200000
#define BoxOrange_Palettes 0x00243e26
#define Rob 0x0023732a
#define BoxGreen_Palettes 0x00243e04
#define BoxYellow_Palettes 0x00243e48
#define DebugBox0 0x0020467e
#define Rob_Palettes 0x00243f9a
#define BoxBlue_Palettes 0x00243e6a
#define BoxTeal_Palettes 0x00243eae
#define BoxRed_Palettes 0x00243f14
#define BoxGreen 0x00204570
#define BoxPink_Palettes 0x00243ef2
#define BoxBlue 0x002045ca
#define TM_00177_Palettes 0x00243f58
#define BoxBrown_Palettes 0x00243ed0
#define BoxPurple 0x002045e8
#define BoxTeal 0x00204606
#define Mission1_Palettes 0x00243de2
#define DebugBox0_Palettes 0x00243f36
#endif
//Bank 0
volMEMWORD(0x2ffff0)=0;
//Display GFX
//Bank 1
volMEMWORD(0x2ffff0)=1;
//Display GFX
//Bank 2
volMEMWORD(0x2ffff0)=2;
//Display GFX
//Bank 3
volMEMWORD(0x2ffff0)=3;
//Display GFX
# $Id: Makefile,v 1.4 2001/05/03 13:43:42 fma Exp $
#######################################
# Base dir of your m68k gcc toolchain #
#######################################
BASEDIR = $(NEODEV)
AS = as
LD = gcc
CC = gcc
AR = ar
OBJC = objcopy
BIN2O = bin2elf
GFXCC = gfxcc
FIXCNV = fixcnv
#######################################
# Path to libraries and include files #
#######################################
INCDIR = $(BASEDIR)/m68k/include
LIBDIR = $(BASEDIR)/m68k/lib
TMPDIR = tmp
###################################
# Output: {cart, cd} *lower case* #
###################################
OUTPUT = cart
#OUTPUT = cd
############################
# Settings for cart output #
############################
ROMSIZE = 0x20000
PADBYTE = 0xFF
##############################
# Object Files and Libraries #
##############################
OBJS = $(TMPDIR)/crt0_$(OUTPUT).o $(TMPDIR)/main.o
LIBS = -lDATlib -lprocess -lc -lgcc
#####################
# Compilation Flags #
#####################
ASFLAGS = -m68000 --register-prefix-optional
LDFLAGS = -Wl,-T$(BASEDIR)/src/system/neo$(OUTPUT).x -Xlinker -Map=output.map
CCFLAGS = -m68000 -O3 -Wall -fomit-frame-pointer -ffast-math -fno-builtin -nostartfiles -nodefaultlibs -D__$(OUTPUT)__
ARFLAGS = cr
DEBUG = -g
##################
# FIX Definition #
##################
FIXFILES = $(BASEDIR)/src/shared/fix_font.bmp
##############
# Make rules #
##############
ifeq ($(OUTPUT),cart)
Build/dev_p1.bin : Build/test.o
# $(OBJC) --gap-fill=$(PADBYTE) --pad-to=$(ROMSIZE) -R .data -O binary $< $@
$(OBJC) --gap-fill=$(PADBYTE) -R .data -O binary $< $@
# copy dev_p1.rom c:\mame\roms\dev.bin /y
else
Build/test.prg : Build/test.o
$(OBJC) -O binary $< $@
endif
#test.o : test.fix $(OBJS)
Build/test.o : $(OBJS)
$(LD) -L$(LIBDIR) $(CCFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
$(TMPDIR)/%.o: %.c
$(CC) -I$(INCDIR) $(CCFLAGS) -c $< -o $@
$(TMPDIR)/%.o: %.s
$(AS) $(ASFLAGS) $< -o $@
clean:
rm -f $(TMPDIR)/*.*
rm -f palettes.pal
rm -f test.o
rm -f test.prg
rm -f test.fix
rm -f test.spr
rm -f dev_p1.rom
############
# FIX Rule #
############
#test.fix : $(FIXFILES)
# $(FIXCNV) $(FIXFILES) -o $@ -pal palettes.pal
#
#$(TMPDIR)/palettes.o: palettes.pal
# $(BIN2O) $< palettes $@
blastar (./5):
Really very impressive but there is still a lot of work to do... I hope you can do it, then it could be a awesome project!
Mega Shocked (./6):
I will apologize in advance as I will probably butcher this...
Any tips or suggestions to on if it is possible to build this into the existing rig would be amazing. Thanks again for this great enhancement!!!!!
# $Id: Makefile,v 1.4 2001/05/03 13:43:42 fma Exp $
#######################################
# Base dir of your m68k gcc toolchain #
#######################################
BASEDIR = $(NEODEV)
AS = as
LD = gcc
CC = gcc
AR = ar
OBJC = objcopy
BIN2O = bin2elf
GFXCC = gfxcc
FIXCNV = fixcnv
#######################################
# Path to libraries and include files #
#######################################
INCDIR = $(BASEDIR)/m68k/include
LIBDIR = $(BASEDIR)/m68k/lib
TMPDIR = tmp
###################################
# Output: {cart, cd} *lower case* #
###################################
OUTPUT = cart
#OUTPUT = cd
############################
# Settings for cart output #
############################
ROMSIZE = 0x100000
PADBYTE = 0x00
##############################
# Object Files and Libraries #
##############################
OBJS = $(TMPDIR)/crt0_$(OUTPUT).o $(TMPDIR)/LevelCollisionMap.o
LIBS = -lDATlib -lprocess -lc -lgcc
#####################
# Compilation Flags #
#####################
ASFLAGS = -m68000 --register-prefix-optional
#LDFLAGS = -Wl,-T$(BASEDIR)/src/system/neo$(OUTPUT).x -Xlinker -Map=output.map
CCFLAGS = -m68000 -O3 -Wall -fomit-frame-pointer -ffast-math -fno-builtin -nostartfiles -nodefaultlibs -D__$(OUTPUT)__
ARFLAGS = cr
DEBUG = -g
##############
# Make rules #
##############
Build/dev_p2.bin : Build/test.o
$(OBJC) --gap-fill=$(PADBYTE) --pad-to=$(ROMSIZE) -R .data -O binary $< $@
#test.o : test.fix $(OBJS)
Build/test.o : $(OBJS)
$(LD) -L$(LIBDIR) $(CCFLAGS) $(OBJS) $(LIBS) -o $@
$(TMPDIR)/%.o: %.c
$(CC) -I$(INCDIR) $(CCFLAGS) -c $< -o $@
$(TMPDIR)/%.o: %.s
$(AS) $(ASFLAGS) $< -o $@
clean:
rm -f $(TMPDIR)/*.*
rm -f palettes.pal
rm -f test.o
rm -f test.prg
rm -f test.fix
rm -f test.spr
rm -f dev_p2.rom
c:\NeoDev\src\samples\GAME\P2\P2_1>make
gcc -Lc:\neodev/m68k/lib -m68000 -O3 -Wall -fomit-frame-pointer -ffast-math -fno-builtin -nostartfiles -nodefaultlibs -D__cart__ tmp/crt0_cart.o tmp/LevelCollisionMap.o -lDATlib -lprocess -lc -lgcc -o Build/test.o
tmp/crt0_cart.o: In function `__security_code':
tmp/crt0_cart.o(.text+0x10e): undefined reference to `bkp_data'
tmp/crt0_cart.o: In function `_entry_user':
tmp/crt0_cart.o(.text+0x1f4): undefined reference to `USER'
tmp/crt0_cart.o: In function `_entry_player_start':
tmp/crt0_cart.o(.text+0x1fa): undefined reference to `PLAYER_START'
tmp/crt0_cart.o: In function `_entry_demo_end':
tmp/crt0_cart.o(.text+0x202): undefined reference to `DEMO_END'
tmp/crt0_cart.o: In function `_entry_coin_sound':
tmp/crt0_cart.o(.text+0x20a): undefined reference to `COIN_SOUND'
* ++====================================================================++
* || common_crt0_cart.s - C Run Time Startup Code for Neo Geo Cartridge ||
* ++--------------------------------------------------------------------++
* || $Id: common_crt0_cart.s,v 1.5 2001/07/13 14:46:31 fma Exp $ ||
* ++--------------------------------------------------------------------++
* || This is the startup code needed by programs compiled with GCC ||
* ++--------------------------------------------------------------------||
* || BGM: Guitar Vader - S.P.Y. ||
* ++====================================================================++
_ZERO_DIVIDE = 0x00c00426
_CHK_CMD = 0x00c00426
_TRAPV_CMD = 0x00c00426
_NPC_1010 = 0x00c00426
_NPC_1111 = 0x00c00426
_IRQ4 = 0x00c00426
_IRQ5 = 0x00c00426
_IRQ6 = 0x00c00426
_IRQ7 = 0x00c00426
********************** Exported Symbols **********************
.globl _start
.globl atexit
********************** Imported Symbols **********************
.globl __do_global_ctors
.globl __do_global_dtors
.globl main
.globl memset
.globl __bss_start
.globl _end
********************** Program Start *************************
** NOTE: Cartridge systems have swapped IRQ1 and IRQ2
.org 0x0000
.long 0x0010f300 |;reset stack ptr
.long 0x00c00402 /*;reset ptr*/
.long 0x00c00408 /*;bus error*/
.long 0x00c0040e /*;address error*/
.long 0x00c00414 /*;illegal instruction*/
.long _ZERO_DIVIDE /*;division by 0*/
.long _CHK_CMD /*;CHK command*/
.long _TRAPV_CMD /*;TRAPV command*/
.long 0x00c0041a /*;illegal privilege*/
.long 0x00c00420 /*;trace exception handling*/
.long _NPC_1010 /*;no package command (1010)*/
.long _NPC_1111 /*;no package command (1111)*/
.long 0x00c00426, 0x00c00426, 0x00c00426 /*;unused*/
.long 0x00c0042c /*;uninitialized interrupt*/
.long 0x00c00426, 0x00c00426, 0x00c00426, 0x00c00426 /*;unused*/
.long 0x00c00426, 0x00c00426, 0x00c00426, 0x00c00426 /*;unused*/
.long 0x00c00432 /*;virtual interrupt*/
|; 0x64
.long _IRQ2, _IRQ1, _IRQ3, _IRQ4, _IRQ5, _IRQ6, _IRQ7 /*;4-7 unused*/
__security_code:
.long 0x76004a6d, 0x0a146600, 0x003c206d, 0x0a043e2d
.long 0x0a0813c0, 0x00300001, 0x32100c01, 0x00ff671a
.long 0x30280002, 0xb02d0ace, 0x66103028, 0x0004b02d
.long 0x0acf6606, 0xb22d0ad0, 0x67085088, 0x51cfffd4
.long 0x36074e75, 0x206d0a04, 0x3e2d0a08, 0x3210e049
.long 0x0c0100ff, 0x671a3010, 0xb02d0ace, 0x66123028
.long 0x0002e048, 0xb02d0acf, 0x6606b22d, 0x0ad06708
.long 0x588851cf, 0xffd83607
.word 0x4e75
.org 0x100
.ascii "NEO-GEO\0"
.word _NGH
.long _PROGRAM_SIZE
.long _WRK_BCKP_AREA
.word _WRK_BCKP_AREA_SIZE
.byte _EYE_CATCHER
.byte _EYE_CATCHER_TILES
.long JPConfig
.long USConfig
.long EUConfig
jmp _ENTRY_USER
jmp _ENTRY_PLAYER_START
jmp _ENTRY_DEMO_END
jmp _ENTRY_COIN_SOUND
_irq3_handler:
move.w #1, 0x3C000C
_dummy_exc_handler:
rte
atexit: |;Dummy atexit (does nothing for now)
moveq #0, d0
_dummy_config_handler:
rts
_irq1_handler: |;Standard IRQ1 handler
move.w #2, 0x3C000C
rte
.org 0x182
.long __security_code
_dummyTIdata:
.word 0x0000
|;* Entry point of our program
_start:
|;* Setup stack pointer and 'system' pointer
|;lea 0x10F300,a7
|;lea 0x108000,a5
|;* Reset watchdog
move.b d0, 0x300001
|;* Flush interrupts
move.b #7, 0x3C000C
move.l #0, TInextTable
|;* Enable interrupts
move.w #0x2000,sr
|;* Initialize BSS section
move.l #_end, d0
sub.l #__bss_start, d0
move.l d0, -(a7)
clr.l -(a7)
pea __bss_start
jbsr memset
jsr 0xc004c2 |; FIX_CLEAR
jsr 0xc004c8 |; LSP_1st
|;* Jump to main
|;* jbsr main
|;* Call global destructors
jbsr __do_global_dtors
|;* For cart systems, infinite loop
9:
jmp 9b(pc)
_entry_user:
|;* Setup stack pointer and 'system' pointer
|;* stack is set up by bios
|;* Reset watchdog
move.b d0, 0x300001
|;* Flush interrupts
move.b #7, 0x3C000C
move.l #0, TInextTable
|;* Enable interrupts
move.w #0x2000,sr
jmp USER
_entry_player_start:
jmp PLAYER_START
rts
_entry_demo_end:
jmp DEMO_END
rts
_entry_coin_sound:
jmp COIN_SOUND
rts
/* $Id: neocart.x,v 1.2 2001/04/13 09:36:11 fma Exp $ */
OUTPUT_FORMAT("elf32-m68k", "elf32-m68k",
"elf32-m68k")
OUTPUT_ARCH(m68k)
ENTRY(_start)
SEARCH_DIR(/usr/m68k/m68k-elf/lib);
/* Do we need any of these for elf?
__DYNAMIC = 0; */
MEMORY
{
/*roma (rx) : ORIGIN = 0x00000000, LENGTH = 0x100000
ram (rwx) : ORIGIN = 0x00100000, LENGTH = 0xE000
romb (rx) : ORIGIN = 0x00110000, LENGTH = 0xF0000
*/
roma (rx) : ORIGIN = 0x00000000, LENGTH = 0x100000
ram (rwx) : ORIGIN = 0x00100000, LENGTH = 0xF000
romb (rx) : ORIGIN = 0x00200000, LENGTH = 0x100000
}
SECTIONS
{
/* Read-only sections, merged into text segment: */
. = 0x80000000 + SIZEOF_HEADERS;
.interp : { *(.interp) }
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.gnu.version : { *(.gnu.version) }
.gnu.version_d : { *(.gnu.version_d) }
.gnu.version_r : { *(.gnu.version_r) }
.rel.init : { *(.rel.init) }
.rela.init : { *(.rela.init) }
.rel.text :
{
*(.rel.text)
*(.rel.text.*)
*(.rel.gnu.linkonce.t*)
}
.rela.text :
{
*(.rela.text)
*(.rela.text.*)
*(.rela.gnu.linkonce.t*)
}
.rel.fini : { *(.rel.fini) }
.rela.fini : { *(.rela.fini) }
.rel.rodata :
{
*(.rel.rodata)
*(.rel.rodata.*)
*(.rel.gnu.linkonce.r*)
}
.rela.rodata :
{
*(.rela.rodata)
*(.rela.rodata.*)
*(.rela.gnu.linkonce.r*)
}
.rel.data :
{
*(.rel.data)
*(.rel.data.*)
*(.rel.gnu.linkonce.d*)
}
.rela.data :
{
*(.rela.data)
*(.rela.data.*)
*(.rela.gnu.linkonce.d*)
}
.rel.ctors : { *(.rel.ctors) }
.rela.ctors : { *(.rela.ctors) }
.rel.dtors : { *(.rel.dtors) }
.rela.dtors : { *(.rela.dtors) }
.rel.got : { *(.rel.got) }
.rela.got : { *(.rela.got) }
.rel.sdata :
{
*(.rel.sdata)
*(.rel.sdata.*)
*(.rel.gnu.linkonce.s*)
}
.rela.sdata :
{
*(.rela.sdata)
*(.rela.sdata.*)
*(.rela.gnu.linkonce.s*)
}
.rel.sbss : { *(.rel.sbss) }
.rela.sbss : { *(.rela.sbss) }
.rel.bss : { *(.rel.bss) }
.rela.bss : { *(.rela.bss) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { *(.rela.plt) }
.init :
{
KEEP (*(.init))
} =0x4e75
.plt : { *(.plt) }
.text :
{
*(.text)
*(.text.*)
*(.stub)
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
*(.gnu.linkonce.t*)
. = ALIGN(0x4);
__CTOR_LIST__ = .;
LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
*(.ctors)
LONG(0)
__CTOR_END__ = .;
__DTOR_LIST__ = .;
LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
*(.dtors)
LONG(0)
__DTOR_END__ = .;
} =0x4e75
_etext = .;
PROVIDE (etext = .);
.fini :
{
KEEP (*(.fini))
} =0x4e75
.rodata :
{
*(.rodata)
*(.rodata.*)
*(.gnu.linkonce.r*)
}
.rodata1 : { *(.rodata1) }
.gcc_except_table : { *(.gcc_except_table) }
/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. */
.ctors ALIGN(4):
{
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
first. Because this is a wildcard, it
doesn't matter if the user does not
actually link against crtbegin.o; the
linker won't look for a file to match a
wildcard. The wildcard also means that it
doesn't matter which directory crtbegin.o
is in. */
KEEP (*crtbegin.o(.ctors))
/* We don't want to include the .ctor section from
from the crtend.o file until after the sorted ctors.
The .ctor section from the crtend file contains the
end of ctors marker and it must be last */
KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
}
.dtors :
{
KEEP (*crtbegin.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
}
. = ALIGN(0x10) + (. & (0x10 - 1));
.data :
{
*(.data)
*(.data.*)
*(.gnu.linkonce.d*)
}
.data1 : { *(.data1) }
.eh_frame : { *(.eh_frame) }
.got : { *(.got.plt) *(.got) }
.dynamic : { *(.dynamic) }
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
.sdata :
{
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
}
_edata = .;
PROVIDE (edata = .);
__bss_start = .;
.sbss :
{
*(.dynsbss)
*(.sbss)
*(.sbss.*)
*(.scommon)
}
.bss :
{
*(.dynbss)
*(.bss)
*(.bss.*)
*(COMMON)
/* Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. */
. = ALIGN(32 / 8);
}
. = ALIGN(32 / 8);
_end = .;
PROVIDE (end = .);
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* These must appear regardless of . */
}
/* $Id: neocart.x,v 1.2 2001/04/13 09:36:11 fma Exp $ */
OUTPUT_FORMAT("elf32-m68k", "elf32-m68k",
"elf32-m68k")
OUTPUT_ARCH(m68k)
ENTRY(_start)
SEARCH_DIR(/usr/m68k/m68k-elf/lib);
/* Do we need any of these for elf?
__DYNAMIC = 0; */
MEMORY
{
roma (rx) : ORIGIN = 0x00200000, LENGTH = 0x100000
}
SECTIONS
{
/* Read-only sections, merged into text segment: */
. = 0x80000000 + SIZEOF_HEADERS;
.interp : { *(.interp) }
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.gnu.version : { *(.gnu.version) }
.gnu.version_d : { *(.gnu.version_d) }
.gnu.version_r : { *(.gnu.version_r) }
.rel.init : { *(.rel.init) }
.rela.init : { *(.rela.init) }
.rel.text :
{
*(.rel.text)
*(.rel.text.*)
*(.rel.gnu.linkonce.t*)
}
.rela.text :
{
*(.rela.text)
*(.rela.text.*)
*(.rela.gnu.linkonce.t*)
}
.rel.fini : { *(.rel.fini) }
.rela.fini : { *(.rela.fini) }
.rel.rodata :
{
*(.rel.rodata)
*(.rel.rodata.*)
*(.rel.gnu.linkonce.r*)
}
.rela.rodata :
{
*(.rela.rodata)
*(.rela.rodata.*)
*(.rela.gnu.linkonce.r*)
}
.rel.data :
{
*(.rel.data)
*(.rel.data.*)
*(.rel.gnu.linkonce.d*)
}
.rela.data :
{
*(.rela.data)
*(.rela.data.*)
*(.rela.gnu.linkonce.d*)
}
.rel.ctors : { *(.rel.ctors) }
.rela.ctors : { *(.rela.ctors) }
.rel.dtors : { *(.rel.dtors) }
.rela.dtors : { *(.rela.dtors) }
.rel.got : { *(.rel.got) }
.rela.got : { *(.rela.got) }
.rel.sdata :
{
*(.rel.sdata)
*(.rel.sdata.*)
*(.rel.gnu.linkonce.s*)
}
.rela.sdata :
{
*(.rela.sdata)
*(.rela.sdata.*)
*(.rela.gnu.linkonce.s*)
}
.rel.sbss : { *(.rel.sbss) }
.rela.sbss : { *(.rela.sbss) }
.rel.bss : { *(.rel.bss) }
.rela.bss : { *(.rela.bss) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { *(.rela.plt) }
.init :
{
KEEP (*(.init))
} =0x4e75
.plt : { *(.plt) }
.text :
{
*(.text)
*(.text.*)
*(.stub)
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
*(.gnu.linkonce.t*)
. = ALIGN(0x4);
__CTOR_LIST__ = .;
LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
*(.ctors)
LONG(0)
__CTOR_END__ = .;
__DTOR_LIST__ = .;
LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
*(.dtors)
LONG(0)
__DTOR_END__ = .;
} =0x4e75
_etext = .;
PROVIDE (etext = .);
.fini :
{
KEEP (*(.fini))
} =0x4e75
.rodata :
{
*(.rodata)
*(.rodata.*)
*(.gnu.linkonce.r*)
}
.rodata1 : { *(.rodata1) }
.gcc_except_table : { *(.gcc_except_table) }
/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. */
.ctors ALIGN(4):
{
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
first. Because this is a wildcard, it
doesn't matter if the user does not
actually link against crtbegin.o; the
linker won't look for a file to match a
wildcard. The wildcard also means that it
doesn't matter which directory crtbegin.o
is in. */
KEEP (*crtbegin.o(.ctors))
/* We don't want to include the .ctor section from
from the crtend.o file until after the sorted ctors.
The .ctor section from the crtend file contains the
end of ctors marker and it must be last */
KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
}
.dtors :
{
KEEP (*crtbegin.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
}
. = ALIGN(0x10) + (. & (0x10 - 1));
.data :
{
*(.data)
*(.data.*)
*(.gnu.linkonce.d*)
}
.data1 : { *(.data1) }
.eh_frame : { *(.eh_frame) }
.got : { *(.got.plt) *(.got) }
.dynamic : { *(.dynamic) }
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
.sdata :
{
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
}
_edata = .;
PROVIDE (edata = .);
__bss_start = .;
.sbss :
{
*(.dynsbss)
*(.sbss)
*(.sbss.*)
*(.scommon)
}
.bss :
{
*(.dynbss)
*(.bss)
*(.bss.*)
*(COMMON)
/* Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. */
. = ALIGN(32 / 8);
}
. = ALIGN(32 / 8);
_end = .;
PROVIDE (end = .);
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* These must appear regardless of . */
}
Mega Shocked (./9):
Thank you for seeing my SOS and reviewing my message in a bottle.
I tried your suggestion and of creating a P2 rom with some data in it.
Upon doing this I was met with challenges and revelations.
I know it sounds and feels like you are helping a delinquent because you are!
-Wl,-T$(BASEDIR)/src/system/neocartBank.x -Xlinker -Map=_bankMap.map
Memory Configuration
Name Origin Length Attributes
roma 0x00000000 0x00100000 xr
ram 0x00100000 0x0000f000 xrw
romb 0x00200000 0x00100000 xr
*default* 0x00000000 0xffffffff
Linker script and memory map
0x80000074 .=(0x80000000+SIZEOF_HEADERS)
<software name="game">
<description>Game Demo</description>
<year>2016</year>
<publisher>MegaShockers</publisher>
<sharedfeat name="release" value="MVS,AES" />
<sharedfeat name="compatibility" value="MVS,AES" />
<part name="cart" interface="neo_cart">
<dataarea name="maincpu" width="16" endianness="big" size="0x500000">
<rom loadflag="load16_word" name="dev_p1.bin" offset="0x000000" size="0x100000" crc="bdda2c6e" sha1="6a94dee2d22feb07ea68a90ce67d5cac1b17b9c9" />
<rom loadflag="load16_word" name="Bank0.bin" offset="0x100000" size="0x100000" crc="d707ec72" sha1="6ca9b79e5679e49684cb8993f532966df3186ec9" />
<rom loadflag="load16_word" name="Bank1.bin" offset="0x200000" size="0x100000" crc="53bed158" sha1="625f9f78980b8272303bd49309ff502e1da68315" />
<rom loadflag="load16_word" name="Bank2.bin" offset="0x300000" size="0x100000" crc="53bed158" sha1="625f9f78980b8272303bd49309ff502e1da68315" />
<rom loadflag="load16_word" name="Bank3.bin" offset="0x400000" size="0x100000" crc="53bed158" sha1="625f9f78980b8272303bd49309ff502e1da68315" />
</dataarea>
<dataarea name="fixed" size="0x040000">
<rom offset="0x000000" size="0x020000" name="fix.bin" crc="0e6a7c73" sha1="31b1194524dcc80ec4d63bac088b6fb4909f496c" />
</dataarea>
<dataarea name="audiocpu" size="0x080000">
<rom offset="0x000000" size="0x080000" name="m1.M1" crc="da4878cf" sha1="ce13d18a4c5d01974df8542c67c4df00dbc6e7c1" />
</dataarea>
<dataarea name="ymsnd" size="0x800000">
<rom name="v1.V1" offset="0x000000" size="0x800000" crc="2ced86df" sha1="d6b73d1f31efbd74fb745200d4dade5f80b71541" />
</dataarea>
<dataarea name="sprites" size="0x2800000">
<rom loadflag="load16_word" name="bk0char.bin" offset="0x000000" size="0x800000" crc="a9bdc000" sha1="93b0dfcd2121ddf6ea1fe99514a176d76e4b0c98" />
<rom loadflag="load16_word" name="bk1char.bin" offset="0x800000" size="0x800000" crc="f8e21968" sha1="e103d4f59cd841267b882580aee338e99f192c3f" />
<rom loadflag="load16_word" name="bk2char.bin" offset="0x1000000" size="0x800000" crc="f8e21968" sha1="e103d4f59cd841267b882580aee338e99f192c3f" />
<rom loadflag="load16_word" name="bk3char.bin" offset="0x1800000" size="0x800000" crc="f8e21968" sha1="e103d4f59cd841267b882580aee338e99f192c3f" />
</dataarea>
</part>
</software>
SET ROMNAME=game
SET MAMEPATH="C:\mame"
SET MAMEROMPATH="C:\mame\roms\
SET PROJECTPATH="C:\NeoDev\src\samples\GAME"
cd %MAMEROMPATH%%ROMNAME%
romwak /f dev_p1.bin p1.p1
romwak /p p1.p1 p1.p1 1024 255
romwak /f BANK0.bin B0.bin
romwak /p B0.bin B0.bin 1024 255
romwak /f BANK1.bin B1.bin
romwak /p B1.bin B1.bin 1024 255
romwak /f BANK2.bin B2.bin
romwak /p B2.bin B2.bin 1024 255
romwak /f BANK3.bin B3.bin
romwak /p B3.bin B3.bin 1024 255
copy /b B0.bin + B1.bin + B2.bin + B3.bin p2.p2
romwak /p bk0Char.bin bk0C.bin 8192 255
romwak /p bk1Char.bin bk1C.bin 8192 255
romwak /p bk2Char.bin bk2C.bin 8192 255
romwak /p bk3Char.bin bk3C.bin 8192 255
CharSplit bk0C.bin -rom a1
CharSplit bk1C.bin -rom b1
CharSplit bk2C.bin -rom d1
CharSplit bk3C.bin -rom e1
ren a1.c1 c1.c1
ren a1.c2 c2.c2
ren b1.c1 c3.c3
ren b1.c2 c4.c4
ren d1.c1 c5.c5
ren d1.c2 c6.c6
ren e1.c1 c7.c7
ren e1.c2 c8.c8
copy /y fix.bin s1.s1
move p1.p1 NeoSDTemp
move p2.p2 NeoSDTemp
move s1.s1 NeoSDTemp
copy m1.M1 NeoSDTemp
copy v1.V1 NeoSDTemp
copy v2.V2 NeoSDTemp
copy v3.V3 NeoSDTemp
move c1.c1 NeoSDTemp
move c2.c2 NeoSDTemp
move c3.c3 NeoSDTemp
move c4.c4 NeoSDTemp
move c5.c5 NeoSDTemp
move c6.c6 NeoSDTemp
move c7.c7 NeoSDTemp
move c8.c8 NeoSDTemp
del b0.bin
del b1.bin
del b2.bin
del b3.bin
del bk0C.bin
del bk1C.bin
del bk2C.bin
del bk3C.bin
CScript zip.vbs C:\mame\roms\game\NeoSDTemp C:\mame\NeoSD\Exports\DEMO_%1.zip
del /q C:\mame\roms\game\NeoSDTemp\*.*
cd C:\mame\NeoSD
NeoBuilder -n DEMO_%1 -m DEMO -y 2021 -g Action Exports\DEMO_%1.zip
START C:\mame\NeoSD
cd %PROJECTPATH%
Mega Shocked (./19):Ah okay. That explains a lot.
The best way I can explain it is. MAME is an emulator and the .neo format is designed for the NeoSD with the intention of running the games on real hardware. In the case of real hardware the game files need to be in a specific format to match the various chips of the time where as MAME can load files with the game data on them that are not necessarily formatted for real hardware.
The script above is allowing me to convert my development files into a format that the Neo Geo can actually read. As per above this can get kinda sticky depending on how you need your files formatted. Neo Geo MVS/AES offered many board configurations based on how BIG your game data is. The good news is MAME lets us cheat and skip this conversion process. The bad news is you need to muddle with this conversion process when you have something worthy of real hardware.