Posté le 25/08/2017 à 18:59 Membre depuis le 21/03/2014, 182 messages
Hi HPMAN,
yes, the bios call method would be desirable... but, as always, the ASM code is the problem...

According to the wiki I think I need to:
1) change "_CDDA_FLAG= 0" in file "crt0_cd.s" to "_CDDA_FLAG= 2" ?
2) call the CDDA routine via ASM
__asm__ ("jsr 0xC0056A");
3) But how to write the command / track number to register D0? As a word? For instance command 04, track no 02 would be 0x0402?
__asm__ ("move.w d0, 0x0402");
Posté le 25/08/2017 à 21:16 Membre depuis le 28/01/2003, 147 messages
Write an asm sub in a .s file (then add to project makefile etc):

.globl CDDA_command

CDDA_command:
move.w 6(a7), d0
movem.l d2-d7/a2-a6, -(a7)
jsr 0xc0056a
movem.l (a7)+, d2-d7/a2-a6
rts

Declare it somewhere in a .h file:
void CDDA_command(ushort cmd);

I'm not sure if the bios call scraps the registers, registers push/pop around the call might be unnecessary.


Staying in C, it should be something looking like:
__asm__ (
	"move.l %0, %%d0 \n"
	"movem.l %%d2-%%d7/%%a2-%%a6, -(%%a7) \n"
	"jsr 0xc0056a \n"
	"movem.l (%%a7)+, %%d2-%%d7/%%a2-%%a6 \n"
	:
	:"r"(/*CDDA code expression*/)
	:"d0", "d1", "a0", "a1", "cc"
);
I hardly ever use this method tho, so it might need some corrections.
Posté le 25/08/2017 à 22:55 Membre depuis le 21/03/2014, 182 messages
Wow - impressive stuff, thanks a lot for the code!
Seems to be a bit more complicated than I have thought before. Will try out both methods and report back as soon as possible.
#mercicool#
Posté le 26/08/2017 à 23:41 Membre depuis le 21/03/2014, 182 messages
Both methods work great emulated in NeoRaine, thanks again for your ASM magic #prosterne#
Unfortunately, no Hardware test yet because I wasted my last two CDR's for trying to burn them in that unusual "mixed mode" Neo Geo CD format (https://wiki.neogeodev.org/index.php?title=Burning_CDs).
Need to buy some new CDR's next week... #doozza#
Posté le 27/08/2017 à 15:55 Membre depuis le 31/07/2017, 14 messages
NeoHomeBrew (./123) :
Both methods work great emulated in NeoRaine, thanks again for your ASM magic #prosterne#
Unfortunately, no Hardware test yet because I wasted my last two CDR's for trying to burn them in that unusual "mixed mode" Neo Geo CD format (https://wiki.neogeodev.org/index.php?title=Burning_CDs).
Need to buy some new CDR's next week... #doozza#
Good news they work emulated, my offer still stands if you want me to test, if you have the ISO, cue and wave file, i use fireburner no mucking around like other programs!
avatar
Posté le 27/08/2017 à 22:56 Membre depuis le 21/03/2014, 182 messages
Thanks for your offer but I want to find it out by myself (by the way, I have used exactly that Fireburner program which has made my Win 7 system freeze and killed one of the two CDR's).
Have ordered an actual Nero version now and I think it should work.
Posté le 27/08/2017 à 23:15 Membre depuis le 31/07/2017, 14 messages
Ok no worries, by the way I don't select the pre selectable options, just right click on the cue file and select fireburner which will take it straight to the ready to burn screen.
avatar
Posté le 02/09/2017 à 18:46 Membre depuis le 21/03/2014, 182 messages
Finally, burning in "Mixed Mode" with Nero Burning Rom has worked. Both ASM methods to play CDDA tracks are working fine on the real hardware. sun
Compared to ADPCM-A, the sound quality of CDDA is just awesome, too bad that the MVS/AES system does not support it.
Posté le 02/09/2017 à 23:57Edité par NeoHomeBrew le 03/09/2017 à 03:17 Membre depuis le 21/03/2014, 182 messages
Black_Jack (./114) :
Interesting!
May I suggest u, if didn't already done, to create multi-level screen (maybe 2 or 3 on top of each other) with secret areas and mid-bosses?
Like in "Devil-Crash" kind of games (that was a flipper game actually but I think it could fit here as well).

Hi Black_Jack,

I have tried to follow your suggestion and have made the background tile layer scrollable, with some kind of a "camera" which follows the ball sprite.
Scrolling the shrinked background tiles works but updating the position of all the animated block sprites (216 sprites in total) each frame has slowed down the game too much.

But anyway, I have used the "scrolling shrinked tile grid" for something different - a 20 x 20 pixel tile background for a Top-Down RPG.
Not sure if that is a good idea since it is quite spite wasting (34 instead of 20 sprites for a full screen) but on the other hand it allows to use tile graphics with a better resolution compared to the usual 16 x 16 pixel tiles.
Only 4 x 4 pixels more per tile sound not that much at first but it means a lot when dealing with pixel art graphics.
I have made a quick mock-up with a little witch walking in a scrolling dungeon room.
The tile graphics are exchangeable and are "inserted" from an external tile set graphic thanks to HPMAN's SC1Put method (I have used the "Tiled" editor to build the room array).

Posté le 03/09/2017 à 03:04 Membre depuis le 27/04/2006, 58460 messages
NeoHomeBrew (./127) :
Compared to ADPCM-A, the sound quality of CDDA is just awesome, too bad that the MVS/AES system does not support it.
Well, they had to make the CD system superior to the MVS/AES on at least one point. Otherwise people like Kuk would be really, really sad hehe

NeoHomeBrew (./128) :
But anyway, I have used the "scrolling shrinked tile grid" for something different - a 20 x 20 pixel tile background for a Top-Down RPG.
Looks good top
avatarZeroblog

« Tout homme porte sur l'épaule gauche un singe et, sur l'épaule droite, un perroquet. » — Jean Cocteau
« Moi je cherche plus de logique non plus. C'est surement pour cela que j'apprécie les Ataris, ils sont aussi logiques que moi ! » — GT Turbo
Posté le 03/09/2017 à 08:58 Membre depuis le 31/07/2017, 14 messages
Thanks for the update NHB glad the CDDA works on real hardware!

Like the little dungeon demo too, maybe something for the future?
avatar
Posté le 03/09/2017 à 23:57 Membre depuis le 21/03/2014, 182 messages
Thank you for your suggestion, to learn how to control something new on the Neo Geo hardware is always fascinating classe

The dungeon demo is just a proof of concept, nothing more for now. Developing a complete RPG project would be an almost impossible task for one person
but, nevertheless, I think I will return to it one day. I am an addicted Zelda fan since my childhood and I am still playing the older pixel-art (non-3D) versions of the game
like "A Link to Past", "Link's Awakening", "Oracle of the Ages/Seasons" and "Minish Cap" again and again. Making a game with a similar concept would be a dream but
I think I still need more experience in programming and also in drawing pixel art to have the abilities and the tool set to make it happen the "right way".