1

Hi all you Neo Maniacs!

DATimage is a tool used to quantize images for display on the Neo Geo Entertainment System and was designed by my friends at Glinkie Games.
One usage might me to process several images for display on the Neo, possibly a cut scene.

Why does DATimage have DAT in it's name?
DATimage is not affiliated with HP "THE" MAN but was designed to output .xml formatting that can be copied and pasted into your chardata.xml file used by DATlib.

I would love any feedback you might have on using the tool. I did my best to follow the HPMAN's documentation style.
At the end of the doc I listed a few questions hoping you guys might have some insight here.

On the tip of my mind is a working example of bankswitching P roms.

Please download the files at http://www.megashocked.com

Mega Shocked over and out

2

Hi,
thanks a lot for this awesome tool, the detailed docs and the sample + source code - it generates a really nice looking output king

3

I think you could compile a 2MB P-rom with: romwak /p xx-p1.p1 xx-p1.p1 2048 255

4

nice idea, nice tool! top

some thoughts:
- commercial games use FIX_CLEAR because most CRTs cant show a full 320px screen, so x-size 304px should be enough.
- 304px * 208px gives you a 8px border around the image but it's close to fullscreen => 304px * 208px = 247palettes => easier to convert! smile
- only ~180palette can be updated during vblank but your video is not 50fps so you can use and update the second palbank during vblank.

please upload the original images of the akira-intro, I want to play around with this. grin

5

Two legends one thread this is getting epic!

NeoHomeBrew

Thanks for the feedback I really appreciate it!
Things are starting to become clearer Samurai Showdown uses a 2mb p rom!
I took your advice and set out to do what I originally intended to do which was get a cut scene with 192 - 320x224 images running.
After changing my p rom size to 2048 and removing "copy /b 063-p1TEMP.p1 + 063-p1TEMP.p1 063-p1.p1" from my makeh.bat file.
I thought I had it made but I got this dreaded message that I don't understand.

ld: region roma is full (Build/test.o section .text)
ld: section .rodata [00000000 -> 00000086] overlaps section .text [00000000 -> 00160e93]
ld: section .data [00100000 -> 00100023] overlaps section .text [00000000 -> 00160e93]
make: *** [Build/test.o] Error 1

Any ideas how I could fix it?

blastar

Many thanks for the feedback!
Please re-download the archive http://www.megashocked.com
The files you are looking for can be found here "Release\program\Unconverted_Images"
I had no idea FIX_CLEAR is a staple in commercial games!
Also I though I would never see the second palbank in action!

6

Did you have filled the empty areas of the "test.o" with with 0xFF after linking?
If not maybe adding the following line will help?

objcopy --gap-fill=0xFF -R .data -O binary Build/test.o Build/dev_p1.rom
romwak /f Build\dev_p1.rom 063-p1TEMP.p1
romwak /p 063-p1TEMP.p1 063-p1TEMP.p1 2048 255

7

output-quality of DATimage is very impressive eek, I cannot mimic this by myself (yet) wink.

I wrote a small test to analyze the v_* images and I see alot of potential when converting this images to ROM.

large image - colors per tile + draw sorted palettes

many tiles uses less than 8 colors so sometimes it's possible to join some palettes (two or more?). sometimes it's possible to reuse a bigger palette containing this colors.
this optimization is not easy and needs some lockup-tables (no simple streaming of data anymore) but together with removing duplicate tiles this will give you alot of free space (less ROM-size, longer animation).

8

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

The mame driver is:ROM_START(akiradmo) /* AES VERSION */ ROM_REGION( 0x300000, "maincpu", 0 ) ROM_LOAD( "dev_p1.bin", 0x000000, 0x100000, CRC(a2801c24) SHA1(627d76ff0740ca29586f37b268f47fb469822529) ) /* TC534200 */ ROM_LOAD( "bank0.bin", 0x100000, 0x100000, CRC(a2801c24) SHA1(627d76ff0740ca29586f37b268f47fb469822529) ) /* TC534200 */ ROM_LOAD( "bank1.bin", 0x200000, 0x100000, CRC(a2801c24) SHA1(627d76ff0740ca29586f37b268f47fb469822529) ) /* TC534200 */ NEO_SFIX_128K( "s1.rom", CRC(0e6a7c73) SHA1(31b1194524dcc80ec4d63bac088b6fb4909f496c) ) /* TC531000 */ NEO_BIOS_AUDIO_64K( "m1.bin", CRC(da4878cf) SHA1(ce13d18a4c5d01974df8542c67c4df00dbc6e7c1) ) /* TC531001 */ ROM_REGION( 0x100000, "ymsnd", 0 ) ROM_LOAD( "v1.bin", 0x000000, 0x1ea00, CRC(149a5c2f) SHA1(d52eac230f7aaa1d70cbb8d50a2513f180c65e4d) ) NO_DELTAT_REGION ROM_REGION( 0x500000, "sprites", 0 ) ROM_LOAD( "bk0char.bin", 0x000000, 0x200000, CRC(63501b2b) SHA1(1c08401e25b81178846102d03788c7fb0946a6a6) ) /* Plane 2,3 */ /* TC538200 */ ROM_LOAD( "bk1char.bin", 0x200000, 0x300000, CRC(63501b2b) SHA1(1c08401e25b81178846102d03788c7fb0946a6a6) ) /* Plane 2,3 */ /* TC538200 */ ROM_END
(Pick whichever S/M/V you have laying around)

9

Three legends one post! This is the ultimate!

NeoHomerBrew

I am using the make file from the sample code.
All the padding is filled correctly there.
Tried adding the lines in the makeh but no dice.
Are you able to compile a 2mb p rom? and run the code on your side?

blastar

You are embarking on a thing of epic proportion. If you figure it out that will be the ultimate of all time!

HPMAN!

I am completely and utterly shocked boing
It is the time of Samurai Showdown 2. All the kids are bowing to the large Samurai machine and I sir am bowing to you!

I am a zombie who needs rest fou
As soon as I recover I will be cutting my teeth trying to comprehend this magic magic
Haven't had the proper time to dip into the code, holy crap it's over my head but sooo cool.

10

Try as I may try as I might there is no Akira Demo in my sights...

Hi HPMAN!

1. Get newest mame64 (mame0176b_64bit.exe)

2. Get all the files together and put them in roms\akiradmo

3. Match the mame driver you provided to the hash\neogeo.xml (Thanks to Jeff for this trick!)
(I put different S/M/V from Samurai Showdown 2)

4. mame64 neogeo -cart1 akiradmo or mame64 aes -cart1 akiradmo

keep getting: Fatal error: Error in RomModule definition: bk1char.bin out of memory region space

My attempt at the driver looks like:
<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_swap" name="dev_p1.bin" offset="0x000000" size="0x100000" crc="a2801c24" sha1="627d76ff0740ca29586f37b268f47fb469822529" /> <rom loadflag="load16_word_swap" name="bank0.bin" offset="0x100000" size="0x100000" crc="a2801c24" sha1="627d76ff0740ca29586f37b268f47fb469822529" /> <rom loadflag="load16_word_swap" name="bank1.bin" offset="0x200000" size="0x100000" crc="a2801c24" sha1="627d76ff0740ca29586f37b268f47fb469822529" /> </dataarea> <rom name="s1.s1" crc="0e6a7c73" sha1="31b1194524dcc80ec4d63bac088b6fb4909f496c" /> <rom name="m1.m1" crc="da4878cf" sha1="ce13d18a4c5d01974df8542c67c4df00dbc6e7c1" /> <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_byte" name="bk0char.bin" offset="0x000000" size="0x200000" crc="63501b2b" sha1="1c08401e25b81178846102d03788c7fb0946a6a6" /> <rom loadflag="load16_byte" name="bk1char.bin" offset="0x200000" size="0x300000" crc="63501b2b" sha1="1c08401e25b81178846102d03788c7fb0946a6a6" /> </dataarea> </part> </software>

11

Is there a 'load16_word' loadflag available for sprite region?

Still using an old mame with compiled drivers grin

Also maincpu region files aren't byteswapped.

12

Hi HPMAN!

mur

New driver code:
<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="a2801c24" sha1="627d76ff0740ca29586f37b268f47fb469822529" /> <rom loadflag="load16_word" name="bank0.bin" offset="0x100000" size="0x100000" crc="a2801c24" sha1="627d76ff0740ca29586f37b268f47fb469822529" /> <rom loadflag="load16_word" name="bank1.bin" offset="0x200000" size="0x100000" crc="a2801c24" sha1="627d76ff0740ca29586f37b268f47fb469822529" /> </dataarea> <rom name="s1.s1" crc="0e6a7c73" sha1="31b1194524dcc80ec4d63bac088b6fb4909f496c" /> <rom name="m1.m1" crc="da4878cf" sha1="ce13d18a4c5d01974df8542c67c4df00dbc6e7c1" /> <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="63501b2b" sha1="1c08401e25b81178846102d03788c7fb0946a6a6" /> <rom loadflag="load16_word" name="bk1char.bin" offset="0x200000" size="0x300000" crc="63501b2b" sha1="1c08401e25b81178846102d03788c7fb0946a6a6" /> </dataarea> </part> </software>
Mame Output and Crash:
Mame64>mame64 aes -cart1 akiradmo dev_p1.bin WRONG LENGTH (expected: 00100000 found: 00002a47) dev_p1.bin WRONG CHECKSUMS: EXPECTED: CRC(a2801c24) SHA1(627d76ff0740ca29586f37b268f47fb469822529) FOUND: CRC(b796ea05) SHA1(4493c4cff0543d317234af095bc870c32c7d3c30) bank0.bin WRONG LENGTH (expected: 00100000 found: 0005a348) bank0.bin WRONG CHECKSUMS: EXPECTED: CRC(a2801c24) SHA1(627d76ff0740ca29586f37b268f47fb469822529) FOUND: CRC(d707ec72) SHA1(6ca9b79e5679e49684cb8993f532966df3186ec9) bank1.bin WRONG LENGTH (expected: 00100000 found: 0006f288) bank1.bin WRONG CHECKSUMS: EXPECTED: CRC(a2801c24) SHA1(627d76ff0740ca29586f37b268f47fb469822529) FOUND: CRC(53bed158) SHA1(625f9f78980b8272303bd49309ff502e1da68315) v1.v1 WRONG LENGTH (expected: 0001ea00 found: 00200000) v1.v1 WRONG CHECKSUMS: EXPECTED: CRC(149a5c2f) SHA1(d52eac230f7aaa1d70cbb8d50a2513f180c65e4d) FOUND: CRC(37703f91) SHA1(a373ebef4c33ba1d8340e826981a58769aada238) bk0char.bin WRONG LENGTH (expected: 00200000 found: 001e9180) bk0char.bin WRONG CHECKSUMS: EXPECTED: CRC(63501b2b) SHA1(1c08401e25b81178846102d03788c7fb0946a6a6) FOUND: CRC(a9bdc000) SHA1(93b0dfcd2121ddf6ea1fe99514a176d76e4b0c98) bk1char.bin WRONG LENGTH (expected: 00300000 found: 0020be80) bk1char.bin WRONG CHECKSUMS: EXPECTED: CRC(63501b2b) SHA1(1c08401e25b81178846102d03788c7fb0946a6a6) FOUND: CRC(f8e21968) SHA1(e103d4f59cd841267b882580aee338e99f192c3f) WARNING: the machine might not run correctly. ----------------------------------------------------- Exception at EIP=000000000380a73b (neosprite_base_device::draw_fixed_layer_2pixels(unsigned int*&, int, unsigned char*, unsigned int const*)+0x000b): ACCESS VIOLATION While attempting to read memory at 0000000000000010 ----------------------------------------------------- RAX=000000000380a730 RBX=0000000000000000 RCX=0000000008cdd1e0 RDX=0000000008a78818 RSI=000000001b5969d0 RDI=0000000000000000 RBP=0000000008a787a0 RSP=0000000008a787a0 R8=0000000000000010 R9=0000000000000000 R10=000000001b5969d0 R11=0000000000000001 R12=0000000008a78818 R13=0000000006246350 R14=0000000006246344 R15=0000000008cdd1e0 ----------------------------------------------------- Stack crawl: 0000000008a787a0: 000000000380a73b (neosprite_base_device::draw_fixed_layer_2pixels(unsigned int*&, int, unsigned char*, unsigned int const*)+0x000b) 0000000008a788e0: 0000000000b03274 (neosprite_base_device::draw_fixed_layer(bitmap_rgb32&, int)+0x0194) 0000000008a78930: 0000000000b026a3 (neogeo_state::screen_update_neogeo(screen_device&, bitmap_rgb32&, rectangle const&)+0x0053) 0000000008a78980: 0000000002b8a140 (screen_device::update_partial(int)+0x0130) 0000000008a789e0: 0000000000b03fdb (neosprite_base_device::sprite_line_timer_callback(void*, int)+0x002b) 0000000008a78a80: 0000000002b803ad (device_scheduler::timeslice()+0x055d) 0000000008a78b00: 0000000002b4a5d8 (running_machine::run(bool)+0x01a8) 0000000008a7f440: 00000000017df41f (mame_machine_manager::execute()+0x015f) 0000000008a7f8c0: 000000000183b384 (cli_frontend::execute(int, char**)+0x0e04) 0000000008a7f930: 00000000017de4c5 (emulator_info::start_frontend(emu_options&, osd_interface&, int, char**)+0x0035) 0000000008a7fd70: 00000000017409bb (utf8_main(int, char**)+0x012b) 0000000008a7fe50: 0000000002f6453c (wmain+0x018c) 0000000008a7ff20: 000000000040140c (__tmainCRTStartup+0x025c) 0000000008a7ff50: 000000000040153b (mainCRTStartup+0x001b) 0000000008a7ff80: 00007ff95d038102 (BaseThreadInitThunk+0x0022) 0000000008a7ffd0: 00007ff95de4c5b4 (RtlUserThreadStart+0x0034)

13

that softlist entry looks like it's missing the groupings for the fix and m1 roms. here's a driver that should hopefully work:
<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>
it will still complain about the sizes not matching, and the hashes of the V1/M1/S1 files will need to be adjusted to match whatever you're using.
avatar

14

4 Legends one post! This is truly epic!

Goes without saying freem thanks so much!

Money in the Bank!!!!!!!

#moneyinthebank#

Now for phase 2 of this sinister plan.

Learning HPMAN's techniques will not be easy but I am game!

15

HPMAN

This is a case of the notorious "bankData.o"

The gift called "parseMap.exe" requires "_bankMap.map" to output "bank0map.s" but "_bankMap.map" needs "bankData.o" to generate.

Is it possible to make "bankData.o" with the tools you have provided? It appears "bankData.o" is hard coded into the makefiles for Bank0 and Bank1.

I am now back to zombie mode picol and will have to stop but these are my findings for today.

Note to self need a program to auto build the imagePack.s file.

16

bankdata.o is compiled object of bankdata.s, I don't get the question ?

17

Hi HPMAN!

I admit that I am an idiot! sad I put away my bankdata.s for safe keeping and that was preventing me from compiling "bankData.o"

Now I have a new issue with truncation...I grabbed some new images and on compile I got these warning messages.
c:\NeoDev\src\samples\DATimageRemix\BANK0>make as -m68000 --register-prefix-optional bankData.s -o tmp/bankData.o out/bk0Maps.s: Assembler messages: out/bk0Maps.s:1264: Warning: Value 0x10000 truncated to 0x0. out/bk0Maps.s:1265: Warning: Value 0x10100 truncated to 0x100. out/bk0Maps.s:1266: Warning: Value 0x10200 truncated to 0x200. out/bk0Maps.s:1267: Warning: Value 0x10300 truncated to 0x300. out/bk0Maps.s:1268: Warning: Value 0x10400 truncated to 0x400. out/bk0Maps.s:1288: Warning: Value 0x10000 truncated to 0x0. out/bk0Maps.s:1290: Warning: Value 0x10200 truncated to 0x200. out/bk0Maps.s:1292: Warning: Value 0x10100 truncated to 0x100. out/bk0Maps.s:1293: Warning: Value 0x10200 truncated to 0x200. out/bk0Maps.s:1295: Warning: Value 0x10300 truncated to 0x300. out/bk0Maps.s:1310: Warning: Value 0x10000 truncated to 0x0. out/bk0Maps.s:1312: Warning: Value 0x10100 truncated to 0x100. out/bk0Maps.s:1313: Warning: Value 0x10200 truncated to 0x200. out/bk0Maps.s:1314: Warning: Value 0x10300 truncated to 0x300. out/bk0Maps.s:1315: Warning: Value 0x10400 truncated to 0x400. out/bk0Maps.s:1316: Warning: Value 0x10500 truncated to 0x500. out/bk0Maps.s:1321: Warning: Value 0x10600 truncated to 0x600. out/bk0Maps.s:1322: Warning: Value 0x10700 truncated to 0x700. gcc -Lc:\neodev/m68k/lib -m68000 -O3 -Wall -fomit-frame-pointer -ffast-math -fno -builtin -nostartfiles -nodefaultlibs -D__cart__ -Wl,-Tc:\neodev/src/system/neoc artBank.x -Xlinker -Map=_bankMap.map ./tmp/bankData.o -lprocess -lc -lgcc -o ban k.o ld: warning: no memory region specified for section `.data' ld: warning: no memory region specified for section `.bss' ld: warning: cannot find entry symbol _start; defaulting to 00200000 objcopy --gap-fill=0xFF -R .data -O binary bank.o bank0.bin parsemap _bankMap.map > bank0map.s
Here is a snippet of 1321 and 1322 from bk0maps.s
.word 0x3590,0x1000, 0x35a4,0x2300, 0x35b8,0x3400, 0x35cc,0x4800, 0x35e0,0x5c00, 0x35f4,0x7000, 0x3608,0x8300, 0x361c,0x9600, 0x3630,0xaa00, 0x3644,0xbe00, 0x3658,0xd200, 0x366c,0xe500, 0x3680,0xf700, 0x3694,0x10600 .word 0x3591,0x1100, 0x35a5,0x2400, 0x35b9,0x3500, 0x35cd,0x4900, 0x35e1,0x5d00, 0x35f5,0x7100, 0x3609,0x8400, 0x361d,0x9700, 0x3631,0xab00, 0x3645,0xbf00, 0x3659,0xd300, 0x366d,0xe600, 0x3681,0xf800, 0x3695,0x10700
When I run the compiled code the image sequence starts strong but then gets scrambled. I assume the truncation messed up the build.

18

Looks like some picture is exceeding 256 palettes

19

Hi HPMAN!

Again I admit that I am an idiot! sad I corrected the frames that had too many palettes no more truncation.

My next issue is how to determine the <starting tile> for a new bank?

I know each bank has a starting tile....

Based on the example you provided when I compile chardata.xml for BANK0 it tells me:

Output from chardata.xml for BANK0:

Processed tiles: 15395
Next free tile: 15651

From the top of chardata.xml for BANK1:

<starting_tile fillmode="none">16384</starting_tile>

When I check BANK1 chardata.xml I find a new value "16384" I was expecting to see "15651"

I think this is the next hurtle for me....If I can determine correct start tiles for the banks I will then adjust the driver to include a larger size for the char.bin files...

20

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.

21

Victoly!! rotfl

https://youtu.be/fh4UXEiPZXM

https://www.dropbox.com/s/uqwisasu6a2f1j0/banked_demo.zip?dl=0

About this demo -
I stumbled upon some footage that I fell in love with. From that point forward the idea of importing that footage was born.

3 Banks - Totaling close to 300 images....
Finally got to use Jeff's SoundBuilder tool. Used v006 driver couldn't get the sample to play with the v011 driver.
The images are "grainy" but imagine if they were touched up for production?
Sorry about CRC's and SHA's wanted to get it out to you guys.

In summary this was an excellent experience!

Goes without saying thank you to the entire yaronet community especially NeoHomeBrew, blastar, freem and HPMAN!

Lots of cool stuff learned...

1. Newer versions of mame allow you to add drivers via the hash folder.
Tip: If hex numbers mess with you like they do me there are plenty of great driver examples you can piggy back off of in neogeo.xml

2. It is not necessary to convert your .bin files to the corresponding P and C files. Mame can run the bins!
So when you need to build a test on real hardware you can worry about converting your .bin files.
I saw a post a while back are you guys spear heading a movement to create some development boards? If so please count me in!
I currently use a "Saulabi Spirits 2" board that has sockets I didn't use receptacles so now it doesn't fit in the case roll but it still works as a test board.
I don't do real hardware tests often because you know the time it takes to do all the eprom burning etc...
*Fun fact I got "bang bang busters" to work on my dev board. I couldn't believe I pulled it off! I was over the moon for a long time I played that game on my board.

3. HPMAN's "banked_demo" code is invaluable! I could not have processed my frames without it and more importantly we have a solid example of banking!!!!
My understanding is basic - 4 banks - 1 p rom to rule them all.
The question is hypothetically is there a custom configuration that would allow for more banks? Virtually unlimited gfx data?

4. Image catalogs rock! Allow your images to be displayed in any order. The demo displays this - BANK2 images are displayed before BANK0 and BANK1.

5. blastar has identified some really cool techniques to better compress gfx! This would be the next level!!!!!!!!!

6. edit* - I can't believe I forgot this one... CLEAR_FIX is used in commercial games. It creates an 8x8 border around the 320 x 224 frame. This is a safe region.
My opinion on this is that I will continue to create my content at 320 * 224 because on flat panel displays the entire region is visible.
I will also make sure nothing important is happening within the imaginary 8*8 border.

7. edit* - I can't believe I forgot this one... 2 pal banks can used to get past the 180 pal per vertical blank issue...this would be so cool to see in action!

8. I was forced to make my first youtube channel, dropbox account and set up a website.
Now that those things are out of the way I was thinking in time Megashocked.com could be a place to feature cool code based tutorials and how to's on the Neo programming end....
EX: I could post a tutorial on how to quickly set up adobe after effects to output image sequences to be processed in DATimage.
EX: Formatting gfx for importing into DATLib
EX: could feature members like NeoHomebrew's attract sequence (great start structure for a game), Memory card!!!
EX: The list goes on HPMAN's Animator, Jeffs Sound Tool, blastars chunky mode (wish you could make a lib so we could brew chunky bosses etc and import them into game creations!)
EX: setting up your environment you name it.
I know alot of what I am into is pretty basic to you guys but...it might be nice to have a place to direct new comers to for some basics.
I know the wikia is the ultimate...I am more thinking about acknowledging people in the community and their work and providing some 'easy' practical examples.
It would be great to capture some of these posts and harness their raw energy into a summarized format as a reference point.
I might be getting ahead of myself just a thought here.

I am Mega Shocked because you guys keep shocking me! You all are the MegaShockers! People like you make it possible for all of us to do what we love!

22

You can go beyond the usual 4 banks config as long as you built the appropriate cart with the matching mapper.

You will run out of char space before having bank issues.

23

HPMAN!
chew sounds very very interesting! It's good to know these capabilities are available!
In the mean I will be super busy with the rig you set up for us! oui

blastar - Curious if you are going to explore your palette optimization technique? or if I should reach out to Glinkie Games to attempt to build it into DATimage.
If I were to reach out to Glinkie Games on this one it would be good if you could provide the desired format you would need output.
I can then show it to Glinkie Games and see if they can match the format you need to compile it with DATlib.
I can't guarantee I can get it done because I know they are super busy but I can do my best!

24

Wow, nice choice to use this Rockman video + Neo-Geo logo animation for your demo. It looks amazing and would be an awesome attract scene for a Rockman game on the Neo-Geo. fou
Mega Shocked (./21) :
Lots of cool stuff learned...
1. Newer versions of mame allow you to add drivers via the hash folder. Tip: If hex numbers mess with you like they do me there are plenty of great driver examples you can piggy back off of in neogeo.xml !

Thank you for sharing - it has pointed me to use the new XML features of MAME too wink
Mega Shocked (./21) :
8. I was forced to make my first youtube channel, dropbox account and set up a website.
Now that those things are out of the way I was thinking in time Megashocked.com could be a place to feature cool code based tutorials and how to's on the Neo programming end....
EX: I could post a tutorial on how to quickly set up adobe after effects to output image sequences to be processed in DATimage.
EX: Formatting gfx for importing into DATLib
EX: could feature members like NeoHomebrew's attract sequence (great start structure for a game), Memory card!!!
EX: The list goes on HPMAN's Animator, Jeffs Sound Tool, blastars chunky mode (wish you could make a lib so we could brew chunky bosses etc and import them into game creations!)
EX: setting up your environment you name it.
I know alot of what I am into is pretty basic to you guys but...it might be nice to have a place to direct new comers to for some basics.
I know the wikia is the ultimate...I am more thinking about acknowledging people in the community and their work and providing some 'easy' practical examples.
It would be great to capture some of these posts and harness their raw energy into a summarized format as a reference point.
I might be getting ahead of myself just a thought here.

I like your idea of having all "C-programming based" tools and demos concentrated on one location. This would be a great starting point for beginners and could possibly motivate more
Neo-Geo fans to create some homebrewed Neo-Geo stuff. I also had a similar plan in my mind to offer some C-based tutorials on my homepage someday in the future.
Unfortunately, it will take a massive amount of time to set it all up and keep it up-to-date. But almost all my spare time goes into my Hypernoid game and therefore it has never happend.
But maybe you are the right man who has the passion and the time to realize a project like this.

25

NeoHomeBrew

Your work on Hypernoid is amazing! Keep up the good work! surf

Over the years I started several Neo related projects but ran into several road blocks. I would say mainly due to lack of experience.
The original NeoDev had only 16 colors per image. This had me thinking differently to get lots of colours on screen!

When DATlib came out Mega Shocked was born. HPMAN's documentation style helped me significantly, to understand DATlib!
At this stage I had a very mature project in the original NeoDev but saw too many benefits to getting DATlib up and running so I experimented until I got some good working examples.
I then began re-coding my project in DATlib this was very time consuming and I am almost there....
At this stage all my free time has been dedicated to making an engine with a good set of tools.
When you guys see what I have done you will probably say it is "backwards" but it is working for me so far.

Certain things have been a bit trickier in DATlib mainly fading and scaling. Your posts have been invaluable to uncover the right approach to these features.
I hadn't even considered a subroutine! After seeing all this stuff come up I'm thinking it would be best to document it in a way where it could be accessed and demonstrated as simplistically as possible.
Soooo much time has been spent on this stuff I don't want someone else to have to go through the same struggles. Also I keep thinking I am going to forget everything I learned and then have to learn it all again confus
I already have a basic look for the site that I think represents but it will be a little while before I have some good content. I really appreciate your vote of confidence and I hope I can do you all proud.

Now I am working on rejigging my setup utilizing HPMAN's banked code.
I am under the school of thought a good game is a good game period but personally I am looking to build games that have the most Mega Shock I can fit in the cart.
At this stage building your subroutine into the framework is my goal. Ideally parts of this process can be documented and turned into a tutorial for the site.
Once things settle back down I can begin work on the engine again.

I've got a question regarding your Subroutine. In your thread you mention:
Just want to share that I have received a bugfix from Jeff (NeoBitz) which prevents loading the title screen twice if the game loop is finished
but still credits available (will cause a screen flicker, like shown at minute 2:18 in the third video). To fix this issue you need to add a
BIOS_COMPULSION_FLAG at the start of the "Title Mode":
volMEMBYTE(0x10FEC5)=0x01; // BIOS_COMPULSION_FLAG

I got confused here and added the BIOS_COMPULSION_FLAG to a few different spots in your code.
Are you able to add a blurb to your thread that highlights the spot where you would plug it in?
I know this is hiding in plain sight. I probably have a learning disability.

A question to whoever is listening....

1. In my code I place boxes X,Y on screen using the Player 2 controller (P2 is for debug stuff).
2. Once all the boxes are placed I print several X,Y co-ordinates to the screen using the fix layer.
3. I then take a picture of the computer screen with my phone (don't laugh) so I can enter the coordinates I captured into my code.
Yes I could figure out mame's screen shot button to avoid using my phone.
I am considering then finding a text recognition software to help me capture the coordinates once I have an image file.

Wondering if there is a way to make my Neo program output a file that contains the co-ordinates I have plotted.
Basically output a .c file from my Neo program by pressing a button on the joystick...don't think less of me for asking this.

26

- store your coordinates into a ram buffer
- dump buffer into a file from mame debugger
- ???
- profit!

27

I have now added the BIOS_COMPULSION_FLAG to the demo code at line 205: http://www.neohomebrew.com/downloads/main.c

Yes, I have the same story behind me to build up a proper work framework which catches up all functions a Neo-Geo game needs. That was the reason for me to go a step back and
make a simple game like Hypernoid to have a smaller and therefore "easier-to-handle" code base before I start to make a more advanced project. It was fun for me to find out how
some of the missing functions could be done in C and I have learned a lot from it. It was only possible thanks to the great support of the members of this forum - thank you to all who
have helped oui. I think now I have all pieces of this puzzle together (except of one small issue I will post soon). I am looking forward so see something of your game project wink

28

HPMAN!

enflamme You blew my mind on this one!

My findings...

1. Assign a test value to a memory address in the program code: volMEMWORD(0x100000)=-5782;
(Hope this is a good start point. I will have 19+ values per dump when this is properly setup)

Mame Debugger

2. Invoke the debugger: mame64 neogeo -cart1 %ROMNAME% -debug
3. Run the program: F5 - to run the program
(wish I could find a flag that would automatically run the program on boot)
EX: mame64 neogeo -cart1 %ROMNAME% -debug -run (fake value I wish existed)
4A. Make a dump file from the debugger console insert: dump XY.txt,0x100000,1,2,0 press enter
4B.Better yet make a file "XY.cmd" that contains your memory range. Saved in the root of your mame directory.
EX: XY.cmd contains this line: dump XY.txt,0x100000,1,2,0
So now all you have to do is write source XY.cmd and hit enter

XY.txt file output from mames debugger
100000: E96A


E96A translates from HEX to -5782 in word decimal which was the test value!
I played with the print features of the debugger to see if I could output in word decimal but no luck.

Thought process now:

1. Make a .bat file that would rip out all of the HEX values stored in XY.txt
2. .bat would also convert HEX values to word decimal
3. Insert word decimals into the code format that I need happy

NeoHomeBrew

Thanks a bunch for adding the BIOS_COMPULSION_FLAG to the demo code!
I will be messing around with the codes!
It is great to hear all the pieces of the puzzle are almost in place key
I look forward to your next post. You always have something crazy going on smile
Hoping to show you some good progress in the near future!