1

Hi wondering if you guys know a trick here....

I will start off by saying I am reformatting my code to accommodate the bank codes the HPMAN provided.
My thought process here is that if my project exceeds the 1MB P1 limit I can fall back on banking to get maximum Mega Shock.superguerrier
I have already formatted quite a bit of my code but I am willing to reverse my code if there is indeed a better way to initialize the sprites. zen

There are two methods known to me:

Method 1: Non-Banked Method

This method uses externs.h in the root of your project directory and has a clean call for graphics initialization.

extern spriteInfo Box;
extern paletteInfo Box_Palettes;

aSpriteInit(&BOX,&Box,1,16,0,0,0,0);
palJobPut(16,Box_Palettes.palCount,Box_Palettes.data);

Method 2: Banked Method

This method does have bk0Include.h which can be included in the root of your Bank directory....
I can compile fine but when I call the graphics data outlined in the file I get a compiler error stating the gfx I am calling do not exist.

Based on the Image Catalog method that HPMAN laid out this is what I have been doing....

1. Image Catalog

.include "bankMaps.s"

MAINROM = 0
BANK_0 = 0
BANK_1 = 1
BANK_2 = 2
BANK_3 = 3
ENDMARK = 0xffff

.globl Sprites
Sprites:
.word BANK_0
.long BOX
.long BOX_Palettes

2. *edit - include imagecatalog.s file to makefile (my name is Sprite.s)

OBJS = $(TMPDIR)/crt0_$(OUTPUT).o $(TMPDIR)/main.o \ $(TMPDIR)/Scrollers.o $(TMPDIR)/Sprites.o $(TMPDIR)/Pictures.o

3. *edit - add struct to represent the data structure in the image catalog

typedef struct sprData {
WORD bank;
spriteInfo* sprInfo; //Where you replace this line with picture/scroller depending on the catalog you are aiming to create
paletteInfo* palInfo;
} spriteData;

4. Sprite List *edit because you will have several sprites in your catalog keeping track of the indexes with defined words is necessary
#define Box 0

5. The graphics initialization is more bulky...1 additional line of code per call and a more verbose call style.

volMEMWORD(0x2ffff0)=Sprites[Box].bank;
aSpriteInit(&BOX1,Sprites[Box].sprInfo,1,16,0,0,0,0);
palJobPut(16,((paletteInfo*)Sprites[Box].palInfo)->palCount,&((paletteInfo*)Sprites[Box].palInfo)->data);


I am not complaining here at all. If this is what needs to be done then so be it.
I am just asking in case I am majorly missing something here.
Hoping with banking there is a way to tap into the clean original style of graphics initialization.
Basically I am asking am I on the right track? or is there an easier way... confus

2

Parse the bank map file into defines to use labels directly.

You have a parser to asm from previous samples, outputting into an asm include something like:BOX = 0x00001234
you need the same thing but as C defines into a .h to use in C:#define BOX 0x00001234

3

Hi HPMAN!

Thanks very much for your help on this one. wink
I was definitely going to crazy using image catalogs for everything!

I found the memory addresses in the file called bank0map.s

did my define....
#define BOX1 0x00001234

did my call...threw in the (spriteInfo*) because of a warning that popped up.
aSpriteInit(&BOX, (spriteInfo*)BOX1,1,16,0,0,0,0);

Works great!!!!sun

Now I am stuck because the paljobPut call has a man down sad

did my define also found in the file called bank0map.s
#define BOX1_Palettes 0x00004567

did my call...threw in the (paletteInfo*) thought it was the right move based on above.
palJobPut(16,1,((paletteInfo*)Box1_Palettes));

Compiles fine. No warnings. Palette is messed up when sprite is displayed....I am closer but still in trouble...confus

4

Palette content is in .data field, add 2 bytes to reach it:
palJobPut(16,1,((paletteInfo*)Box1_Palettes+2));

5

Hi HPMAN!

Sprites now jiving with Pals sun sun Many thanks for helping me out on this one.

In the end adding by 1 got the palette data I was looking for!

I was looking to reduce the number of lines of code and to eliminate the Image Catalog.s files (Created independent .s files for pictures, scrollers, and sprites)
I imagine the Image Catalogs must have an overhead associated with them?

This......
aSpriteInit(&BOX, (spriteInfo*)BOX1,1,16,0,0,0,0);palJobPut(16,1,((paletteInfo*)Box1_Palettes+1));

Reads nicer and has one less line of code than this....(My basic thinking)
volMEMWORD(0x2ffff0)=Sprites[Box].bank;
aSpriteInit(&BOX1,Sprites[Box].sprInfo,1,16,0,0,0,0);palJobPut(16,((paletteInfo*)Sprites[Box].palInfo)->palCount,&((paletteInfo*)Sprites[Box].palInfo)->data);

I quickly realized that call model 1 above relies on the defined values not changing!
#define BOX1 0x00001234#define BOX1_Palettes 0x00004567

As soon as I add a graphic to the middle of the chardata.xml list or modify the size of an existing graphic it is GAME OVER skull
because all of the defined values in bank0map.s will change making the defines I laid out useless tripaf

So now I am faced with the same question. Is Image Catalogs the best way to go when using the banked model?

On one hand I say yes because I can play with the chardata.xml file and catalog won't budge as long my gfx naming convention remains the same.
On the other hand there is the concern that an image catalog for this purpose helps bloat the program code (additional line of code seen above + code for the catalog + what ever resources the catalog needs to exist when the program is running)

Any insight on this one would be greatly appreciated sorry for the basic-ness here.

**Note I added an additional step above in the initial post just to demonstrate the proper struct needs to be added to the program code for the image catalog to work.
I followed what HPMAN did with pictures in the initial example and applied to sprites.

6

HPMAN (./2) :
Parse the bank map file into defines to use labels directly.

loupe

7

Thanks a million HPMAN!
I think I get it now! Instead of manually creating the defines the defines should automatically regenerate every time the bank0map.s file changes!

8

Hi Mega Shocked,
what about neocartBank.x in makefile's LDFLAGS ?


Thanks
Ciao
BEY
RetroIsTheOnlyFuture!

9

Hi BEY!

I looked at my current makefile and it looks like this...

LDFLAGS = -Wl,-T$(BASEDIR)/src/system/neo$(OUTPUT).x -Xlinker -Map=output.map

Sorry for what follows I am very basic...

The banked demo provided by HPMAN in the post below was the basis for this thread.

topics/186412-datimage

My first steps are get HPMAN's demo working as is....he shows a very valuable technique he calls image catalogs plus he hooks up the banking method!!
From here you can experiment with different methods of calling your sprites.
The thread above where he introduces the demo may have some beginner stuff (questions by yours truly) that may help get the demo running.

The current state of affairs

My goal is to integrate HPMAN's example as the framework of my project.

I started to consider:

1. The syntax of gfx calls (the above posts consider a call style similar to what HPMAN introduced in DATLib)
2. Image catalogs are added to the makefile. If there isn't a need for image catalogs can the makefile be avoided?

At the end of the above post HPMAN helped me realize I need to parse bank0map.s in order to accommodate the syntax to closer match the gfx calls introduced in DATlib.

Heres what I do now....

When I compile gfx my pipe line includes this call....

parseBankToDefineBank0 .\bank0map.s .\Bank0.h


The .vbs script below could be saved as
parseBankToDefineBank0.vbs

Const ForReading = 1 Const ForWriting = 2 filePath = WScript.Arguments(0) outFilePath = WScript.Arguments(1) Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile(filePath) Do Until f.AtEndOfStream currentLine = f.ReadLine strText = strText & "#define " & Replace(currentLine, " = ", " ") & vbCrlf Loop f.Close Set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.FileExists(outFilePath) then objFSO.DeleteFile(outFilePath) Set objFile = objFSO.CreateTextFile(outFilePath) Else Set objFile = objFSO.CreateTextFile(outFilePath) End If objFile.WriteLine "#ifndef __BANK0GFX_H__" objFile.WriteLine "#define __BANK0GFX_H__" objFile.WriteLine "" objFile.WriteLine strText objFile.WriteLine "#endif"
The above parses bank0map.s into defines to be referenced in the gfx calls.

My gfx calls now look like this....similar to DATLib and much different in comparison to the original banked demo. classe

aSpriteInit(&player->player.sprite,(spriteInfo*)Player1,INDEX_PLAYERSPRITEPOOL,PAL_PLAYER1,player->player.x,player->player.y,0,FLIP_NONE); palJobPut(PAL_PLAYER1,1,((paletteInfo*)Player1_Palettes+1));
However I do have a snag that I have been meaning to bug HPMAN about...

I have had a false sense of security for a long while.
My Bank0 was taking a while to build so I figured I would add my gfx to Bank1.
After all I have Bank0, Bank1, Bank2 and Bank3 to play with so why not use another Bank for testing purposes when one bank takes a while to build?

I realize now that a line of code I eliminated was extremely important from the perspective of accessing the other banks!!!! scotch

volMEMWORD(0x2ffff0)=imagePack[frameIndex].bank;

I reviewed the imagePack and saw this....

MAINROM = 0 BANK_0 = 0 BANK_1 = 1 BANK_2 = 2 BANK_3 = 3 ENDMARK = 0xffff

I don't use the imagepack so I thought maybe I could get away with this...

Assuming the player 1 sprite was on Bank1.

volMEMWORD(0x2ffff0)=1; //I assume this is the secret code that references the next bank. I insert 1 hoping that this would be a reference to Bank1...I also tried some casting and stuff but I still can't reference the gfx I am trying to display aSpriteInit(&player->player.sprite,(spriteInfo*)Player1,INDEX_PLAYERSPRITEPOOL,PAL_PLAYER1,player->player.x,player->player.y,0,FLIP_NONE); palJobPut(PAL_PLAYER1,1,((paletteInfo*)Player1_Palettes+1));
Unfortunately the above example does not work and I am currently without access to any of other banks outside of Bank0. Hoping HPMAN can help on this one.

10

Writing 0/1/2/3 to 0x2ffff0 will set up bank 0/1/2/3.

What's the setup/anatomy of your rom?


Also keep in mind the lib doesn't support banking atm, you won't be able to use elements from various banks in the same scene.

11

optimized to avoid storing a big string in RAM (you can write the output file while reading the input file)

Const ForReading = 1
Const ForWriting = 2

filePath = WScript.Arguments(0)
outFilePath = WScript.Arguments(1)
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(filePath)

If fso.FileExists(outFilePath)  then
	fso.DeleteFile(outFilePath)  
End If 
Set objFile = fso.CreateTextFile(outFilePath)

objFile.WriteLine "#ifndef __BANK0GFX_H__"
objFile.WriteLine "#define __BANK0GFX_H__"
objFile.WriteLine ""

Do Until f.AtEndOfStream
	currentLine =  f.ReadLine
	objFile.WriteLine "#define " & Replace(currentLine, "	=	", " ")
Loop

f.Close
objFile.WriteLine "#endif"
objFile.Close

12

Hi HPMAN!

I was able to perform some tests today. I modified your banked demo to include the third Bank.
I then included:

Bank0 = 1 sprite
Bank1= 1 picture
Bank3 = 1 scroller

Just as you described this is the case. I could access each of the individual gfx.

HPMAN (./10) :
Writing 0/1/2/3 to 0x2ffff0 will set up bank 0/1/2/3.

In my case I was mixing elements from different banks together and that was messing me up. I didn't realize a move like this would get me into trouble!

HPMAN (./10) :

Also keep in mind the lib doesn't support banking atm, you won't be able to use elements from various banks in the same scene.

I suppose in it's current state if you had a level with all new enemies you could use the next bank if you mirrored your Players GFX data to that bank as well....Not ideal but just saying could be done if you found yourself in a pinch. Very happy to know that option exists currently!

Hi squalyl!

Thanks a bunch for refactoring the .vbs script! I have tested it and it works like a charm!

As always HUGE THANK YOU guys!

13

Mega Shocked (./9) :
Hi BEY!

I looked at my current makefile and it looks like this...

LDFLAGS = -Wl,-T$(BASEDIR)/src/system/neo$(OUTPUT).x -Xlinker -Map=output.map

Sorry for what follows I am very basic...

The banked demo provided by HPMAN in the post below was the basis for this thread.

topics/186412-datimage

Thx Mega Shocked!
Sorry my fault, neocartBank.x is in HP's template:
MEMORY { roma (rx) : ORIGIN = 0x00200000, LENGTH = 0x100000 }
I have read all information in other banked demo thread and there are some things I can't understand (my ignorance is endless!) mur

I have tried some bank experiment with no success in the neogeo.xml custom xml, very interesting argument, but the question is:
I have to recalculate CRC/SHA1 code (how?) or can I reuse/copy something that already exists with 2 p1 Banks, ex. Alpha Mission II ?
<software name="alpham2"> <description>Alpha Mission II / ASO II - Last Guardian (NGM-007 ~ NGH-007)</description> <year>1991</year> <publisher>SNK</publisher> <info name="serial" value="NGM-007 (MVS), NGH-007 (AES)"/> <info name="release" value="19910325 (MVS), 19910701 (AES)"/> <info name="alt_title" value="ASO II ?????????"/> <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="0x100000"> <rom loadflag="load16_word_swap" name="007-p1.p1" offset="0x000000" size="0x080000" crc="5b266f47" sha1="8afbf995989f47ad93fea1f31a884afc7228b53a" /> <!-- TC534200 --> <rom loadflag="load16_word_swap" name="007-p2.p2" offset="0x080000" size="0x020000" crc="eb9c1044" sha1="65d3416dcd96663bc4e7cefe90ecb7c1eafb2dda" /> <!-- TC531024 --> </dataarea> <dataarea name="fixed" size="0x040000"> <rom offset="0x000000" size="0x020000" name="007-s1.s1" crc="85ec9acf" sha1="39a11974438ad36a2cc84307151b31474c3c5518" /> <!-- TC531000 --> </dataarea> <dataarea name="audiocpu" size="0x020000"> <rom offset="0x000000" size="0x020000" name="007-m1.m1" crc="28dfe2cd" sha1="1a1a99fb917c6c8db591e3be695ce03f843ee1df" /> <!-- TC531001 --> </dataarea> <dataarea name="ymsnd" size="0x200000"> <rom name="007-v1.v1" offset="0x000000" size="0x100000" crc="cd5db931" sha1="b59f9f2df29f49470312a6cd20f5669b6aaf51ff" /> <!-- TC538200 --> <rom name="007-v2.v2" offset="0x100000" size="0x100000" crc="63e9b574" sha1="1ade4cd0b15c84dd4a0fb7f7abf0885eef3a3f71" /> <!-- TC538200 --> </dataarea> <dataarea name="sprites" size="0x300000"> <rom loadflag="load16_byte" name="007-c1.c1" offset="0x000000" size="0x100000" crc="8fba8ff3" sha1="1a682292e99eb91b0edb9771c44bc5e762867e98" /> <!-- TC538200 --> <rom loadflag="load16_byte" name="007-c2.c2" offset="0x000001" size="0x100000" crc="4dad2945" sha1="ac85a146276537fed124bda892bb93ff549f1d93" /> <!-- TC538200 --> <rom loadflag="load16_byte" name="007-c3.c3" offset="0x200000" size="0x080000" crc="68c2994e" sha1="4f8dfc6e5188942e03b853a2c9f0ea6138dec791" /> <!-- TC534200 --> <rom loadflag="load16_byte" name="007-c4.c4" offset="0x200001" size="0x080000" crc="7d588349" sha1="a5ed789d7bbc25be5c5b2d99883b64d379c103a2" /> <!-- TC534200 --> </dataarea> </part> </software>
Thanks
Ciao
BEY
RetroIsTheOnlyFuture!

14

Haarg!! Sorry, wrong MAME version.

Solution: blabla
mame64 neogeo -cart1 akiradmo

read MAME error mess:bank0.bin WRONG CHECKSUMS: EXPECTED: CRC(d707ec72) SHA1(6ca9b79e5679e49684cb8993f532966df3186ec9) FOUND: CRC(77eff147) SHA1(1371ff5244e3e376c4f79bf07010f85fc7a5ea7f) bank1.bin WRONG LENGTH (expected: 00100000 found: 00074da4) bank1.bin WRONG CHECKSUMS: EXPECTED: CRC(53bed158) SHA1(625f9f78980b8272303bd49309ff502e1da68315) FOUND: CRC(a7fc1dee) SHA1(c5aea78375231d2a8f4e9ec89419055119bae7a4) s1.s1 NOT FOUND (tried in neogeo neogeo\akiradmo akiradmo) v1.v1 WRONG LENGTH (expected: 0001ea00 found: 00100000) v1.v1 WRONG CHECKSUMS: EXPECTED: CRC(149a5c2f) SHA1(d52eac230f7aaa1d70cbb8d50a2513f180c65e4d) FOUND: CRC(bb89262a) SHA1(4dbfa2f6ffce3a10b905b9bd807d33cd02a88eca) bk0char.bin WRONG LENGTH (expected: 00200000 found: 0034c700) bk0char.bin WRONG CHECKSUMS: EXPECTED: CRC(a9bdc000) SHA1(93b0dfcd2121ddf6ea1fe99514a176d76e4b0c98) FOUND: CRC(84eba506) SHA1(a771cbc5efe7b61114db6b7f776b5ab93f09b2bc) bk1char.bin WRONG LENGTH (expected: 00300000 found: 002e0400) bk1char.bin WRONG CHECKSUMS: EXPECTED: CRC(f8e21968) SHA1(e103d4f59cd841267b882580aee338e99f192c3f) FOUND: CRC(a731451c) SHA1(aae521c38430a2797c7a60d970a0179673f05215) Fatal error: Required files are missing, the machine cannot be run.
Copy/Paste into neogeo.xml FOUND value LENGTH / CRC/SHA1

Thanks
Ciao
BEY
RetroIsTheOnlyFuture!

15

http://www.frozenlogic.org/summerproperties.shtml

CRC doen's matter anyway, mame will run the game regardless.

16

Hi BEY!

My steps to get HPMAN's banked demo running

Step 1: Building your Rom

1. Download HPMAN's Banked Demo

Reworked the demo, split data across two bank regions for demonstration purpose:
https://www.dropbox.com/s/6nhfjj3azvp711l/banked_demo.zip?dl=0

2. Copy and paste the Banked Demo into your NeoDev samples folder.

3. Make a new folder titled "akiradmo"

fill folder with the following copies

Copy banked_demo\DATimage\Build\dev_p1.bin
Copy banked_demo\DATimage\BANK0\Bank0.bin
Copy banked_demo\DATimage\BANK1\Bank1.bin

Copy banked_demo\DATimage\BANK0\out\bk0Char.bin
Copy banked_demo\DATimage\BANK1\out\bk1Char.bin

You will also need s1 m1 and v1 (if you are in a pinch download https://www.dropbox.com/s/uqwisasu6a2f1j0/banked_demo.zip?dl=0
In this archive there is rmdmo.zip which contains these files.

Copy s1 m1 and v1 to your "akiradmo" folder and rename m1.rom to m1.m1 and v1.rom to v1.v1.

Copy "akiradmo" folder to your mame directory EX: C:\mame64\roms

Step 2: Add your driver to mame

Open C:\mame64\hash\neogeo.xml

insert this driver provided by freem

<software name="akiradmo"> <description>Akira Demo</description> <year>2016</year> <publisher>HPMAN</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="0x300000"> <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" /> </dataarea> <dataarea name="fixed" size="0x040000"> <rom offset="0x000000" size="0x020000" name="s1.s1" crc="0e6a7c73" sha1="31b1194524dcc80ec4d63bac088b6fb4909f496c" /> </dataarea> <dataarea name="audiocpu" size="0x040000"> <rom name="m1.m1" crc="da4878cf" sha1="ce13d18a4c5d01974df8542c67c4df00dbc6e7c1" /> </dataarea> <dataarea name="ymsnd" size="0x100000"> <rom name="v1.v1" offset="0x000000" size="0x1ea00" crc="149a5c2f" sha1="d52eac230f7aaa1d70cbb8d50a2513f180c65e4d" /> </dataarea> <dataarea name="sprites" size="0x500000"> <rom loadflag="load16_word" name="bk0char.bin" offset="0x000000" size="0x200000" crc="a9bdc000" sha1="93b0dfcd2121ddf6ea1fe99514a176d76e4b0c98" /> <rom loadflag="load16_word" name="bk1char.bin" offset="0x200000" size="0x300000" crc="f8e21968" sha1="e103d4f59cd841267b882580aee338e99f192c3f" /> </dataarea> </part> </software>
Step 3: Run your rom!

using cmd navigate to your mame directory and execute mame64 neogeo -cart1 akiradmo
Your rom should run!

Next Steps

Assuming NeoDev and DATlib 2.0 is installed and running. EX: You can build and run HPMAN's sample files.
Now you can focus on rebuilding these files on your own and replacing them in your akiradmo directory....

banked_demo\DATimage\Build\dev_p1.bin
banked_demo\DATimage\BANK0\Bank0.bin
banked_demo\DATimage\BANK1\Bank1.bin

banked_demo\DATimage\BANK0\out\bk0Char.bin
banked_demo\DATimage\BANK1\out\bk1Char.bin

just leave s1, m1 and v1 alone they are necessary place holders for now.

17

Mega Shocked (./16) :
Hi BEY!

My steps to get HPMAN's banked demo running

Step 1: Building your Rom

1. Download HPMAN's Banked Demo

Reworked the demo, split data across two bank regions for demonstration purpose:
https://www.dropbox.com/s/6nhfjj3azvp711l/banked_demo.zip?dl=0

2. Copy and paste the Banked Demo into your NeoDev samples folder.

3. Make a new folder titled "akiradmo"

fill folder with the following copies

Copy banked_demo\DATimage\Build\dev_p1.bin
Copy banked_demo\DATimage\BANK0\Bank0.bin
Copy banked_demo\DATimage\BANK1\Bank1.bin

Copy banked_demo\DATimage\BANK0\out\bk0Char.bin
Copy banked_demo\DATimage\BANK1\out\bk1Char.bin

You will also need s1 m1 and v1 (if you are in a pinch download https://www.dropbox.com/s/uqwisasu6a2f1j0/banked_demo.zip?dl=0
In this archive there is rmdmo.zip which contains these files.

Copy s1 m1 and v1 to your "akiradmo" folder and rename m1.rom to m1.m1 and v1.rom to v1.v1.

Copy "akiradmo" folder to your mame directory EX: C:\mame64\roms

Step 2: Add your driver to mame

Open C:\mame64\hash\neogeo.xml

insert this driver provided by freem

<software name="akiradmo"> <description>Akira Demo</description> <year>2016</year> <publisher>HPMAN</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="0x300000"> <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" /> </dataarea> <dataarea name="fixed" size="0x040000"> <rom offset="0x000000" size="0x020000" name="s1.s1" crc="0e6a7c73" sha1="31b1194524dcc80ec4d63bac088b6fb4909f496c" /> </dataarea> <dataarea name="audiocpu" size="0x040000"> <rom name="m1.m1" crc="da4878cf" sha1="ce13d18a4c5d01974df8542c67c4df00dbc6e7c1" /> </dataarea> <dataarea name="ymsnd" size="0x100000"> <rom name="v1.v1" offset="0x000000" size="0x1ea00" crc="149a5c2f" sha1="d52eac230f7aaa1d70cbb8d50a2513f180c65e4d" /> </dataarea> <dataarea name="sprites" size="0x500000"> <rom loadflag="load16_word" name="bk0char.bin" offset="0x000000" size="0x200000" crc="a9bdc000" sha1="93b0dfcd2121ddf6ea1fe99514a176d76e4b0c98" /> <rom loadflag="load16_word" name="bk1char.bin" offset="0x200000" size="0x300000" crc="f8e21968" sha1="e103d4f59cd841267b882580aee338e99f192c3f" /> </dataarea> </part> </software>
Step 3: Run your rom!

using cmd navigate to your mame directory and execute mame64 neogeo -cart1 akiradmo
Your rom should run!

Next Steps

Assuming NeoDev and DATlib 2.0 is installed and running. EX: You can build and run HPMAN's sample files.
Now you can focus on rebuilding these files on your own and replacing them in your akiradmo directory....

banked_demo\DATimage\Build\dev_p1.bin
banked_demo\DATimage\BANK0\Bank0.bin
banked_demo\DATimage\BANK1\Bank1.bin

banked_demo\DATimage\BANK0\out\bk0Char.bin
banked_demo\DATimage\BANK1\out\bk1Char.bin

just leave s1, m1 and v1 alone they are necessary place holders for now.


Hi Mega Shocked and HPMan!
First really thanks for your patience, I'm really noob calin

I have successfully compiled your code after change my png lists, buildchar chardata.xml, rebuilt BANK0/1 .bin, made new imagePacks.s and copy/paste all .bin + s1/m1/v1 files into rom.zip. No compile errors but no result.... after neogeo's emulator start then reset.

I have made various experiments with DatLibs with no problems (Ex. 971 png frames video with one palette 2 colors in one dev_p1.bin) but this banked demo template don't work for me.
I'm sorry but I still don't completely understand how to solve this problem. confus


Thanks
Ciao
BEY
RetroIsTheOnlyFuture!

18

Hi BEY!

Were you able to run HPMAN's Banked Demo? (Without compiling just copying the files in the original archive including s1,m1,v1 and freem's driver?)

Did you put neocart.x provided in by HPMAN in his banked demo archive into C:\NeoDev\src\system? This file must be in place when compiling your own files.

I have over flowed the bk0char.bin and bk1char.bin with too much gfx in the past causing symptoms you described. You might have to adjust the start tiles in chardata.xml on Bank1.

The rockman demo should be easy to get running use the same process as posted in the steps above. (driver is included in the archive)
It has a different configuration for the sprites so if you are overflowing your chars you could try to use the rockman demo as your base. (shot in the dark it may work...I believe the roms in driver are larger)

If you upload your file I can take a look and try to get it to work but not sure what could be causing your issue.

19

Mega Shocked (./18) :
I have over flowed the bk0char.bin and bk1char.bin with too much gfx in the past causing symptoms you described.

THX Mega Shocked !
a little step forward today.
The problem is too much gfx as you say, now BANK0 (with my png) work fine! oui

BANK1 still not work.

You might have to adjust the start tiles in chardata.xml on Bank1.

My BANK1 start tile offset in chardata.xml is:
<starting_tile fillmode="dummy">44548</starting_tile>
This is the next free tile value from buildchar BANK0's process:
Processing 785 of 785: ..\gfx\Intro\v_ba04097.png / v_ba04097 Loading file... OK Picking tiles... [280 tiles] Tilemap... Palettes... Optimizing Tilemap... Palettes... DONE - [53 tiles / 1 palettes] Saving... OK. ## Sprites - 0 items Processed tiles: 44292 Next free tile: 44548
HPMAN/Mega Shocked: There is a different calculation method for BANK n+1 next tile ?

PS: your rockman demo is working fine for me.


Thanks
Ciao
BEY
RetroIsTheOnlyFuture!

20

Hi BEY!

HPMAN wrote in the previous thread....

Yeah supposedly should be 15651, however 16384 tiles is 2MB, so that's just an easy setup for the driver.
You don't need to fine tune untill your data is final. Don't want to adjust driver every time a tile count changes.

In your case substitute 15651 above with your 44548...

Maybe try....
<setup> <starting_tile fillmode="none">16384</starting_tile> <charfile>out\bk1Char.bin</charfile> <mapfile>out\bk1Maps.s</mapfile> <palfile>out\bk1Pals.s</palfile> <incfile>out\bk1Include.h</incfile> </setup>
P.S. Make sure your P roms never exceed 1mb in the case they do your demo will break.
If the P rom exceeds 1mb move gfx from the overflowing bank to the next bank.

21

Is your issue code not running or incorrect graphics?

Seems you are not loading your char file where it's supposed to be.

Also, use fillmode=none" for this, or you will generate 40k dummy tiles that will shift your content.

22

HPMAN (./21) :
Is your issue code not running or incorrect graphics?

Seems you are not loading your char file where it's supposed to be.

Also, use fillmode=none" for this, or you will generate 40k dummy tiles that will shift your content.

Hi HPMAN,
I have incorrect graphics at BANK1 swith also with fillmode=none" .

I've try some experiment like fith BANK0/1/..N in different memory size according to neocartBank.x and driver.xml

Actually my bkXchar.bin have these size:
bk0char.bin 0x00570200
bk1char.bin 0x002ef500

Driver.xml
<dataarea name="sprites" size="0xc00000">
<rom loadflag="load16_word" name="bk0char.bin" offset="0x000000" size="0x600000" crc="a9bdc000" sha1="93b0dfcd2121ddf6ea1fe99514a176d76e4b0c98" />
<rom loadflag="load16_word" name="bk1char.bin" offset="0x600000" size="0x600000" crc="f8e21968" sha1="e103d4f59cd841267b882580aee338e99f192c3f" />

Only Bank0 gfx are working while Bank1 have incorrect graphics.

I'll try with different Bank and driver size (Ex. 0x200000 or 0x400000) reducing gfx number in banks



Thanks
Ciao
BEY
RetroIsTheOnlyFuture!

23

You must match your load location to where you are mapping your tiles.

If you are loading bank1 @0x600000, set starting_tile to 49152 (6MB/128B per tile)

24

HPMAN (./23) :
You must match your load location to where you are mapping your tiles.

If you are loading bank1 @0x600000, set starting_tile to 49152 (6MB/128B per tile)


IT WORK!!! flag gol

THANKS HPMAN !!! #071#

Thanks
Ciao
BEY
RetroIsTheOnlyFuture!