42bs Posted March 13 Share Posted March 13 A reworked version and ported converter. https://github.com/42Bastian/JagHivelyPlayer The converter should be fully standard C, so any GCC should be able to compile it. 6 1 Quote Link to comment Share on other sites More sharing options...
Ericde45 Posted March 14 Share Posted March 14 very good work as usual. keep the source flowing from coders to other coders, this way the Jaguar will keep on improving. 1 4 Quote Link to comment Share on other sites More sharing options...
42bs Posted March 15 Author Share Posted March 15 Updated version. Bitstream reading reworked, optimized. Since the bits are now counted 1..32 the start of stream changed, hence a new hvl2stream is needed! 1 Quote Link to comment Share on other sites More sharing options...
Ericde45 Posted March 15 Share Posted March 15 once stable and 'finished', might go in raptor API, no ? Quote Link to comment Share on other sites More sharing options...
42bs Posted March 15 Author Share Posted March 15 Finished? Quote Link to comment Share on other sites More sharing options...
Ericde45 Posted March 15 Share Posted March 15 you cleaned my code, and dirty code was my excuse to tell CJ that Hively was not a good candidate for Raptor. so now, with your work, ..... Quote Link to comment Share on other sites More sharing options...
42bs Posted March 15 Author Share Posted March 15 Just found another bug thanks to @laoo's simulator: r14+4 in rmacs is offset 16 in Lyxass is index 1. Unless from this, it is pretty stable. Need to run a bunch of HVLs to check. I left most of the large symbols though Lyxass won't compile it (32char limit ATM). Quote Link to comment Share on other sites More sharing options...
Ericde45 Posted March 16 Share Posted March 16 a source for modules : http://modland.com/pub/modules/HivelyTracker/ 1 Quote Link to comment Share on other sites More sharing options...
42bs Posted March 16 Author Share Posted March 16 and AHX http://modland.com/pub/modules/AHX/ Quote Link to comment Share on other sites More sharing options...
ggn Posted March 16 Share Posted March 16 On 3/15/2024 at 4:17 PM, 42bs said: Just found another bug thanks to @laoo's simulator: r14+4 in rmacs is offset 16 in Lyxass is index 1. Is this a code generation bug? Quote Link to comment Share on other sites More sharing options...
42bs Posted March 16 Author Share Posted March 16 1 hour ago, ggn said: Is this a code generation bug? No, bug in RMAC. Only that RMAC uses the direct value (1..32) and lyxass the offset (4..128). So for small numbers the mnemonic is valid for either Assembler but of course the resulting opcode is different. 1 Quote Link to comment Share on other sites More sharing options...
CyranoJ Posted March 17 Share Posted March 17 4 hours ago, 42bs said: No, bug in RMAC. Only that RMAC uses the direct value (1..32) and lyxass the offset (4..128). So for small numbers the mnemonic is valid for either Assembler but of course the resulting opcode is different. Please dont change the default, it will break a LOT of code. RMAC handles this exactly like MAC currently. Quote Link to comment Share on other sites More sharing options...
+DrTypo Posted March 17 Share Posted March 17 I'm interested in this player. I compiled hvl2stream in visual studio. I had to hack together a unistd.h but it seems to convert hvl and ahx to streambits successfully. A usage demo of the player would be nice since I didn't manage to get anything to play. I set the parameter field as indicated in the source code : pointer to stream, pointer to AHX_FilterPrecalc.bin, pointer to AHX_panning.bin, master volume set to 255. I set REGPAGE in D_FLAGS before starting the DSP. Quote Link to comment Share on other sites More sharing options...
42bs Posted March 17 Author Share Posted March 17 4 hours ago, CyranoJ said: Please dont change the default, it will break a LOT of code. RMAC handles this exactly like MAC currently. No, of course not. I was thinking if there is a way to "detect" mis-use. For lyxass it is easier, an odd index is an indicator. RMAC only if the index is greater than 32. Quote Link to comment Share on other sites More sharing options...
42bs Posted March 17 Author Share Posted March 17 (edited) 3 hours ago, DrTypo said: I'm interested in this player. I compiled hvl2stream in visual studio. I had to hack together a unistd.h but it seems to convert hvl and ahx to streambits successfully. A usage demo of the player would be nice since I didn't manage to get anything to play. I set the parameter field as indicated in the source code : pointer to stream, pointer to AHX_FilterPrecalc.bin, pointer to AHX_panning.bin, master volume set to 255. I set REGPAGE in D_FLAGS before starting the DSP. Did you "enable" sound? It is not done (yet) in the player. Also ON_OFF must be set to 0! But yes, an example is missing. Edited March 17 by 42bs Quote Link to comment Share on other sites More sharing options...
42bs Posted March 17 Author Share Posted March 17 Here my code from nostaliga: movei #DSP_start,r0 movei #DSP_RAM,r1 movei #(DSP_end-DSP_start),r2 nop cpy_dsp: load (r0),r3 addq #4,r0 subq #4,r2 store r3,(r1) jr pl,cpy_dsp addq #4,r1 movei #DSP_flag_replay_ON_OFF,r14 movei #song,r0 store r0,(r14+16) movei #$100,r0 store r0,(r14+12) movei #binPrecalcTable,r0 store r0,(r14+8) movei #panning_table,r0 store r0,(r14+4) moveq #0,r0 store r0,(r14) and later moveq #0,r0 bset #14,r0 movei #$f1a100,r14 store r0,(r14) movei #$f1b000,r0 store r0,(r14+$10) ; PC moveq #1,r0 store r0,(r14+$14) ; GO BTW: Setting DSP_flag_replay_ON_OFF == 5 will pause the song. Setting it to 1 will stop the DSP (states 2 and 3 are internal, when 4 it is stopped) Quote Link to comment Share on other sites More sharing options...
+DrTypo Posted March 17 Share Posted March 17 29 minutes ago, 42bs said: Also ON_OFF must be set to 0! That was it! It sounds great! Nice to hear the Jaguar producing new kind of sounds. Good job @Ericde45 and @42bs. Now what would be nice for games is a sound FX channel, like PCM samples. I guess it is not trivial to integrate with the current logic of the player, and the DSP is already nearly full. Do you think something could be done? Maybe reducing the number of synthesis channel to 8 could free up some memory to add the additional logic... 1 1 Quote Link to comment Share on other sites More sharing options...
42bs Posted March 17 Author Share Posted March 17 Cool it works. Yes, SFX is another task. My current WIP version has 148b free. Reducing it to 6/4 channels/RM channels increases it to 1476, so plenty of space for SFX mixing in. Quote Link to comment Share on other sites More sharing options...
ggn Posted March 17 Share Posted March 17 11 hours ago, CyranoJ said: Please dont change the default, it will break a LOT of code. RMAC handles this exactly like MAC currently. No, of course not. It is, however, problematic if one wants to use code from one assembler to the other and hit upon such a problem. And I wouldn't want to force a change in Lyxass too either. The only compromise I can think of would be that the code author would write a warning note in the source code, or somehow detect one or the other assembler and fail if the wrong one is detetcted. Quote Link to comment Share on other sites More sharing options...
42bs Posted March 17 Author Share Posted March 17 Hmm, maybe have define lyxass a symbol __LYXASS__ and rmac __RMAC__. 1 Quote Link to comment Share on other sites More sharing options...
42bs Posted March 17 Author Share Posted March 17 Demo added, showing start/stop and pause. TODO: Select different songs. Quote Link to comment Share on other sites More sharing options...
ggn Posted March 17 Share Posted March 17 51 minutes ago, 42bs said: Hmm, maybe have define lyxass a symbol __LYXASS__ and rmac __RMAC__. I added an issue about this (http://jlhconsulting.gotdns.com/bugs/show_bug.cgi?id=230), shouldn't be too hard to implement! And apologies for the derail, I'll let you guys move the discussion ahead in peace :). 1 Quote Link to comment Share on other sites More sharing options...
42bs Posted March 17 Author Share Posted March 17 Demo updated with 5 songs. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.