1

Hello
I am trying (again) to setup a working DATlib / NeoDev environment, and I face the same problem as the last time I tried: I can't get DATlib to build the C roms properly. I tried to compile the demo included with DATlib 0.3, everything works except the C roms. I have no problem displaying stuff on the fix, but no sprites. I used the included makefile.
Here is my full zipped NeoDev folder: https://transfernow.net/ddl/neodev00001
Thanks in advance for helping me figuring out what's wrong
avatar

2

defalt45 (./1):
Hello
I am trying (again) to setup a working DATlib / NeoDev environment, and I face the same problem as the last time I tried: I can't get DATlib to build the C roms properly. I tried to compile the demo included with DATlib 0.3, everything works except the C roms. I have no problem displaying stuff on the fix, but no sprites. I used the included makefile.
Here is my full zipped NeoDev folder: https://transfernow.net/ddl/neodev00001
Thanks in advance for helping me figuring out what's wrong

Strange things. I copied the DATlib folder to src directory of my SDK, and everything compiles properly!

lSYc
avatar

3

Thanks for your answer. I am sure the problem comes out of my total misunderstanding of makefiles, as even with the bare NeoDev kit withoutt DATlib I can't get any sprite to display, even with a program I know is good (the included sample "sprites").
As there is no .bat build program, I simply do "make" then "makeroms" then "make clean", only to find out that the C roms are totally empty.
Do you use the included makefile?
avatar

4

defalt45 (./3):Do you use the included makefile?

Yes. I am use. But C rom are generating by not makefile, but by BuildChar utility and stored inside out directory in the your program sources folder. Its name is char.bin.
avatar

5

I figured out the problem. It was caused because of MAME that requires a certain file size for the C roms
avatar

6

defalt45 (./5):
I figured out the problem. It was caused because of MAME that requires a certain file size for the C roms


Phe-e-ee-eeew! OK, good luck with programming!
avatar

7

Si tu as des problèmes pour lancer tes roms avec Mame, utilises winkawaks+loader.
Il suffit d'éditer le fichier asr.dat pour ajouter un jeu à la liste.

To solve your problems with Mame, use winkawaks + loader.
Just edit the asr.dat file to add new rom to the list.

https://ufile.io/4rprx
La Neo c' est beau sous tous ses supports (EXIT PS3 CACA AND CI)

8

Merci de l'astuce wink
Par contre maintenant j'ai un nouveau problème, dès que j'affiche plusieurs sprites à l'écran, ça reset et Z80 error.
/----
Thanks for the tip wink
But now I have another problem, when I try to display multiple sprites at the same time, it resets then Z80 error.

I have 2 pictures in chardata.xml, one is named "nsmlogo1" and the other one "jet". So, to display them both, what I think I should do is this:

picture logoNsmPict;
picture jetPict;

pictureInit(&logoNsmPict, &nsmlogo1, 210, 17,16,40,FLIP_NONE);
palJobPut(17,nsmlogo1.palInfo->count,&nsmlogo1.palInfo->data);

pictureInit(&jetPict, &jet, 209, 18, 10,10,FLIP_NONE);
palJobPut(18,jet.palInfo->count,&jet.palInfo->data);

But when I do it it crashes. Anyone has a clue about this?
avatar

9

defalt45 (./8):
Merci de l'astuce wink
Par contre maintenant j'ai un nouveau problème, dès que j'affiche plusieurs sprites à l'écran, ça reset et Z80 error.
/----
Thanks for the tip wink
But now I have another problem, when I try to display multiple sprites at the same time, it resets then Z80 error.

I have 2 pictures in chardata.xml, one is named "nsmlogo1" and the other one "jet". So, to display them both, what I think I should do is this:

picture logoNsmPict;
picture jetPict;

pictureInit(&logoNsmPict, &nsmlogo1, 210, 17,16,40,FLIP_NONE);
palJobPut(17,nsmlogo1.palInfo->count,&nsmlogo1.palInfo->data);

pictureInit(&jetPict, &jet, 209, 18, 10,10,FLIP_NONE);
palJobPut(18,jet.palInfo->count,&jet.palInfo->data);

But when I do it it crashes. Anyone has a clue about this?

Give us a link to your sources, please. We'll try to figure it out.
avatar

10

Thanks a lot, here is the link: https://ufile.io/5q7uc
avatar

11

defalt45 (./10):
Thanks a lot, here is the link: https://ufile.io/5q7uc

For some reason I successed to build the program again. Please attach the screenshot with your BuildChar/compiler crash message.
avatar

12

It compiles with no error but the emulator crashes when the program runs
avatar

13

defalt45 (./12):
It compiles with no error but the emulator crashes when the program runs


Then paste this text -

<software name="DATdemo"> <description>DATlib sample program</description> <year>2018</year> <publisher>default45</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="0x100000"> <rom loadflag="load16_word" name="dev_p1.rom" offset="0x000000" size="0xe9a6" crc="941E888B" sha1="B7901E5324CC547F83CC06C111456CF6486F5E6B" /> </dataarea> <dataarea name="fixed" size="0x040000"> <rom loadflag="load16_word" name="fix.bin" offset="0x000000" size="0x020000" crc="B7070D6F" sha1="546934C53D854347E4812BBFB014D3C58284DA73" /> </dataarea> <dataarea name="audiocpu" size="0x020000"> <rom offset="0x000000" size="0x020000" name="demo-m1.bin" crc="44E5F154" sha1="B3F80051789E60E5D8C5DF0408F1ABA51616E92D" /> </dataarea> <dataarea name="ymsnd" size="0x100000"> <rom name="demo-v1.bin" offset="0x000000" size="0x100000" crc="6F8CCDDC" sha1="696DF2D0F416C2374B0EB7C858486054688C5BCA" /> </dataarea> <dataarea name="sprites" size="0x400000"> <rom loadflag="load16_word" name="char.bin" offset="0x000000" size="0x6c880" crc="4EFD1E42" sha1="2EDED512DDA53B906EA7DCF98348D2B952BA30D5" /> </dataarea> </part> </software>
- to the neogeo.xml file in your MAME.
avatar

14

Thank you, but the problem is not caused by this. I can execute the program as puzzledp in MAME. What happens is that the emulator resets when I display more than one picture/scroller/sprite at the same time
avatar

15

defalt45 (./14):I can execute the program as puzzledp in MAME.

Why do you need this absolutely unnecessary and pointless nervado? Adding of the new original romset to the rombase is a much more simple and comfortable way to launch own program.
avatar

16

In your code at Title_mvs, every frame you init the same picture, you must init only one time in your loop function like :

// main loop //////////////////////////////////////////////////////////////////// void USER(void) { int demo_timer=600; int flash_timer=0; int P1_continue_timer=0; int P2_continue_timer=0; int P1_game_over_timer=0; int P2_game_over_timer=0; int P1_input_delay=0; int P2_input_delay=0; int AES_user_mode=0; int AES_P1_credits=0; int AES_P2_credits=0; int AES_P1_state=0; int AES_P2_state=0; LSPCmode=0x900; initGfx(); clearFixLayer(); clearSprites(1, 381); palJobPut(0,9,fixPalettes); pictureInit(&logoNsmPict, &nsmlogo1, 210, 17,16,40,FLIP_NONE); palJobPut(17,nsmlogo1.palInfo->count,&nsmlogo1.palInfo->data); pictureInit(&jetPict, &jet, 160, 18, 10,10,FLIP_NONE); palJobPut(18,jet.palInfo->count,&jet.palInfo->data); SCClose(); while(1) {
And pictureInit(&jetPict, &jet, 160, 18, 10,10,FLIP_NONE); takes more than a tile.
Jet -> 209 and logo->210. I think you need at least 2 sprites for jet so something like jet -> 208 and logo -> 210

17

Thanks for your answer. I noticed that it worked when initialized only 1 time, but if I do so the sprites will be always displayed, or here some sprites should be displayed only at certain times. For example I display picture nsmlogo as sprite 12,13... and jet as sprites 11 and 12, and then I should be able to clear everything and display another picture/scroller/... with sprite id 11,12,13... which I cannot do if I initialize everything at the beginning of the code.
avatar

18

You can position them off screen or use aSpriteHide found on page 68 of the docs. I do believe that I had to use aSpriteAnimate after aSpriteHide to get the sprite off screen.
avatar

19

Thank you all, it finally worked.
avatar

20

defalt45 (./19):
Thank you all, it finally worked.

Then give us a new link to your project! As I know, the sources of this project contains a lot of useful things I can use in my project.
avatar

21

defalt45 (./17) :
Thanks for your answer. I noticed that it worked when initialized only 1 time, but if I do so the sprites will be always displayed, or here some sprites should be displayed only at certain times. For example I display picture nsmlogo as sprite 12,13... and jet as sprites 11 and 12, and then I should be able to clear everything and display another picture/scroller/... with sprite id 11,12,13... which I cannot do if I initialize everything at the beginning of the code.

It's just an example to init sprite but you can do it inside your function :
// TITLE MODE MVS //////////////////////////////////////////////////////////////////////////////////////// if(volMEMBYTE(0x10FDAE)==3 && volMEMBYTE(0x10FDAF)==1) // bios_user_request=3, bios_user_mode=1 { volMEMBYTE(0x10FEC5)=0x01; // BIOS_COMPULSION_FLAG prevents that compulsion doesn't restart twice, if still credits available from previous gameplay clearFixLayer(); backgroundColor(0x7000); // background color volMEMWORD(0x400002)=0x6BDA; // fix layer font color if (gameState == 0) { pictureInit(&logoNsmPict, &nsmlogo1, 210, 17,16,40,FLIP_NONE); palJobPut(17,nsmlogo1.palInfo->count,&nsmlogo1.palInfo->data); pictureInit(&jetPict, &jet, 160, 18, 10,10,FLIP_NONE); palJobPut(18,jet.palInfo->count,&jet.palInfo->data); gameState = 1; } //fixPrintf( 2, 4,8,3,"============ TITLE MVS ============="); fixPrintf(16, 18,8,3,"TIME:%02d", convertHexToDecimal(volMEMBYTE(0x10FDDA))); // BIOS-COMPULSION-TIMER - timer for forced game start