ggn Posted March 21, 2017 Share Posted March 21, 2017 (edited) I've sent ggn the code to reset the module. And of course that didn't work . After a lot of fiddling I did came up with a way to reset the module. I pushed an update to the repositories, so you have to get the updated rbasic.h from that for this method to work. What it boils down to is something like this: MODPLAY(0) SNDKILL(0) SNDKILL(1) SNDKILL(2) SNDKILL(3) VSYNC U235SE_modregdump[0]=0 U235SE_modregdump[2]=0 U235SE_modregdump[3]=0 U235SE_modregdump[4]=0 U235SE_modregdump[5]=0 'Play module 2 MODPLAY((int)strptr(Module2)) The first command will stop the module playing. The next four will attempt to silence any samples played (some times this doesn't work, I couldn't figure out why). The vsync was empirically added because I saw that this helped the code to be stable. Then the U235SE's internal parameters are reset. Finally the new module will start playing. Not tested on real hardware - had to rely on VJ here. So who knows what happens! Edited March 21, 2017 by ggn 3 Quote Link to comment Share on other sites More sharing options...
Zerosquare Posted March 21, 2017 Share Posted March 21, 2017 I'd add SACRIFICE_GOAT just to be sure. Just don't tell Jeff Minter 2 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted March 21, 2017 Share Posted March 21, 2017 Would setting a counter that loads the MOD file again be a viable workaround while this is being sorted out? Maybe something that increments during the vblank and gets triggered when the song is supposed to end? 2 Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted March 21, 2017 Author Share Posted March 21, 2017 (edited) Edit: It works great now! Thanks so much! Edited March 21, 2017 by atari2600land 1 Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted March 21, 2017 Author Share Posted March 21, 2017 Here is the game in case anyone wants to try out the new code on real hardware. I wish I could, but I can't. justthegame.zip Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted March 21, 2017 Share Posted March 21, 2017 Really enjoying watching this one come along. Video from real h/w. https://youtu.be/hyC6tDWxrP4 1 Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted March 21, 2017 Author Share Posted March 21, 2017 Why don't the MODs play correctly? Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted March 21, 2017 Author Share Posted March 21, 2017 See if this version plays them OK or not. stickman13a.zip Quote Link to comment Share on other sites More sharing options...
ggn Posted March 21, 2017 Share Posted March 21, 2017 I'd add SACRIFICE_GOAT just to be sure. Just don't tell Jeff Minter Nope, but I can add MAKE_BAD_JOKES_WHILE_EATING_BAGUETTE if you like... 2 Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted March 22, 2017 Share Posted March 22, 2017 Sorry, been at work all day. Here's a video of 13a. https://youtu.be/eFRrk7OgH5s Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted March 22, 2017 Author Share Posted March 22, 2017 Apparently ggn's code fix does not work on real hardware. Quote Link to comment Share on other sites More sharing options...
ggn Posted March 22, 2017 Share Posted March 22, 2017 (edited) Ok, so let's see now. I noticed that you include the code with the binary archives so I thought I'd take a peek if you don't mind. if Headturnanimframe=180 then MODPLAY(0) SNDKILL(0) SNDKILL(1) SNDKILL(2) SNDKILL(3) VSYNC U235SE_modregdump[0]=0 U235SE_modregdump[2]=0 U235SE_modregdump[3]=0 U235SE_modregdump[4]=0 U235SE_modregdump[5]=0 endif if Headturnanimframe>180 then Fframe=3 MODPLAY((int)strptr(MOD_ALTTSMUSIC)) RSETOBJ(titlescreen,R_sprite_active,R_is_active) RSETOBJ(walrus,R_sprite_active,R_is_inactive) RSETOBJ(ingamebg,R_sprite_active,R_is_inactive) endif if Headturnanimframe>220 then Fframe=2 Sorry, what? You're stopping the module at frame 180 and then starting it up again for 40 frames till the counter hits 220? Also sub move_eraser1 MODPLAY((int)strptr(MOD_INGAMESONG)) MODVOL(15) RLOCATE 116,17 PRINT "score=";score Again: wat? You're starting up the main tune every frame ingame? How is that even supposed to work? I'm not sure what happens inside the U235SE (that's for linkovitch to answer) but this is completely NOT what the guideline I posted above. I didn't say "oh please start up the mod every frame, that'll teach it a lesson, the old fool!", just "use this snippet to stop the module and then start it OCNE". If I'm being a bit harsh, well, I'm getting a bit tired of "rb+ is broken" / "it's the others' fault, not mine" blame shifts. Please, do continue posting progress reports and questions, but leave the conclusions to the reader. Also, I didn't test it on a real machine but this might fix things up a bit. Edited March 22, 2017 by ggn 1 Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted March 22, 2017 Author Share Posted March 22, 2017 I had changed the code since then, It reads now: ... if Headturnanimframe=180 then MODPLAY(0) SNDKILL(0) SNDKILL(1) SNDKILL(2) SNDKILL(3) VSYNC U235SE_modregdump[0]=0 U235SE_modregdump[2]=0 U235SE_modregdump[3]=0 U235SE_modregdump[4]=0 U235SE_modregdump[5]=0 MODPLAY((int)strptr(MOD_ALTTSMUSIC)) endif if Headturnanimframe>180 then Fframe=3 RSETOBJ(titlescreen,R_sprite_active,R_is_active) RSETOBJ(walrus,R_sprite_active,R_is_inactive) RSETOBJ(ingamebg,R_sprite_active,R_is_inactive) endif and sub move_eraser1 MODVOL(15) RLOCATE 116,17 PRINT "score=";score scoretimer++ if (scoretimer=59) then score++ scoretimer=0 endif RSETOBJ(eraser1,R_sprite_active,R_is_active) ... I'm sorry, I should have posted the new code after realizing that that didn't work. I'm also sorry that I don't know very much about jaguar coding. walrus.bas Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted March 23, 2017 Author Share Posted March 23, 2017 I moved the instances of the mod clearing code into one gosub then I called it every time I needed it. I don't know what to do here, and I'm sorry if I sound angry but I would really like the music to work good, even though it's only my first Jaguar game. Here is the most recent ROM and the most recent BAS. I cleaned up the code a little. stickman13b.zip Quote Link to comment Share on other sites More sharing options...
ggn Posted March 23, 2017 Share Posted March 23, 2017 (edited) I'm sorry, I should have posted the new code after realizing that that didn't work. I'm also sorry that I don't know very much about jaguar coding. Nobody is accusing you of that. Nobody is perfect, and everyone started at zero knowledge. From personal experience, programming needs stubbornness and practice. I'm stubborn enough and don't want to admit defeat easily so I just keep bashing the problems till they work. When that happens then I sit down and try to find out why this works and the other thing didn't. And like I said above, it's not a crime to ask questions or report bugs. It just saves (at least me) a substantial amount of time looking for non-bugs, looking at other people's code. What I'm simply asking is for people to put on some effort like I did when I was jamming everything together making rb+. Edited March 23, 2017 by ggn 2 Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted March 23, 2017 Share Posted March 23, 2017 I'll help anyone showing some spirit and willing to put in the effort. Pressing CTRL-C/CTRL-V doesn't count. 1 Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted May 10, 2017 Author Share Posted May 10, 2017 Got back to working on this again. Figured out how to make your own font. 5 Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted May 11, 2017 Author Share Posted May 11, 2017 Is there any way to change the score color? Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted May 11, 2017 Share Posted May 11, 2017 Is there any way to change the score color? Change the colour in the font .bmp Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted May 11, 2017 Author Share Posted May 11, 2017 I changed it to green and it shows up red. Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted May 11, 2017 Share Posted May 11, 2017 Ah. With the api the font takes the palette from the partipal.bmp file. Not sure if rb is the same but check that. Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted May 11, 2017 Author Share Posted May 11, 2017 After fiddling with various files for 90 minutes, I finally made it green. 5 Quote Link to comment Share on other sites More sharing options...
WAVE 1 GAMES Posted May 11, 2017 Share Posted May 11, 2017 After fiddling with various files for 90 minutes, I finally made it green. stickmangreen.png Good work, and nice font. Which one of the 3 .bmp files did you change, and how were you able to change the red to green? I assume you had to delete everything in the build folder? Quote Link to comment Share on other sites More sharing options...
ggn Posted May 11, 2017 Share Posted May 11, 2017 Good work, and nice font. Which one of the 3 .bmp files did you change, and how were you able to change the red to green? I assume you had to delete everything in the build folder? Depends on the font size you want to print - 8x8, 8x16 or 16x16. You don't need to delete anything from the build folder as the current versions of the font files are being used with each build. Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted May 11, 2017 Share Posted May 11, 2017 Titles, music, input, collision detection, animation, scoring: A+ for effort that man! Onwards and upwards to better things 3 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.