TattooRose Posted May 23, 2018 Share Posted May 23, 2018 (edited) Hi Jac and NRV, ASAPCONV I probably did not explain this correctly. I am using the Donkey_Kong.Sap file from the SAP archive and trying to convert it to an RMT with ASAPCONV. When I run the command line it returns a conversion error. Maybe this type of operation is not allowed in ASAPCONV. Hope that clears that step up. Vertical Blank Setup In the InitHardware section where I assign the initial FONT address along with the Display List and PM address I included the following setup for a simple VBI. ldx >#VBIHandler ldy <#VBIHandler lda #$07 jsr SETVBI Then I set the following: lda #[NMI_DLI + NMI_VBI] ; enable DLI's and VBI's sta NMIEN Then after that any VcountWait 120 statements are commented out as not to interfer with the VBI's Vertical Blank Routine VBIHandler jmp XITVBI When I run this code the initial screen draws and the player draws but then it freezes. When I hit F8 in the emulator the disassembled code is pointing to a BRK. XEX I have just posted a build without the VBI to the projects XEX folder. You can get it on GitHub. Let me know if there is anything else you may need. Thanks for looking Edited May 23, 2018 by TattooRose Quote Link to comment Share on other sites More sharing options...
Mathy Posted May 24, 2018 Share Posted May 24, 2018 Hello guys Could somebody please correct the typing error in the title of this thread? Sincerely Mathy 1 Quote Link to comment Share on other sites More sharing options...
pirx Posted May 24, 2018 Share Posted May 24, 2018 (edited) Meh, better to name the native square game "Plaform" and s'all good, man. Edited May 24, 2018 by pirx 2 Quote Link to comment Share on other sites More sharing options...
emkay Posted May 24, 2018 Share Posted May 24, 2018 Meh, better to name the native square game "Plaform" and s'all good, man. Yeah, PLA FORM , the fun game for Machine Code programmers. Quote Link to comment Share on other sites More sharing options...
+JAC! Posted May 24, 2018 Share Posted May 24, 2018 ASAPCONV I probably did not explain this correctly. I am using the Donkey_Kong.Sap file from the SAP archive and trying to convert it to an RMT with ASAPCONV. When I run the command line it returns a conversion error. Maybe this type of operation is not allowed in ASAPCONV. Hope that clears that step up. You can only convert back to RMT what was an RMT before the conversion to SAP. But the Donkey Kong tune is a hand written player by Landon Dyer. Quote Link to comment Share on other sites More sharing options...
TattooRose Posted May 24, 2018 Share Posted May 24, 2018 Hi Jac,, Thanks for the information. It helped. Quote Link to comment Share on other sites More sharing options...
NRV Posted May 24, 2018 Author Share Posted May 24, 2018 Nice changes in your version. You already have music and sound effects. Is kind of funny seeing Bounty Bob destroyed by a laser Your moving platform seems to work well. It would be nice if you can make the movement "per pixel" instead of "per char" (for the player and the platform). One way could be having 3 more chars per side (6 in total) with the different offsets for the platform left and right sides. Or having 2 special chars per platform, for the left and right borders, and you update the content every frame. All this assuming the middle section of the platform doesn't have a visual pattern that also needs to be updated. Other option could be using player/missile graphics, but then you need special code to check that collision. Don't know how you made the player move with the platform, but if I were to implement moving platforms I probably would put the player in a special state, or maybe save the "id" of the platform where the player is walking, and later add any delta movement of that platform also to the player. Also, probably it would be better if you define now ladders with two chars, the left and right sides, so you can lock the player horizontal position to the center of the ladder. Having swimming and climbing animations would be great Vertical Blank Setup In the InitHardware section where I assign the initial FONT address along with the Display List and PM address I included the following setup for a simple VBI. ldx >#VBIHandler ldy <#VBIHandler lda #$07 jsr SETVBI Then I set the following: lda #[NMI_DLI + NMI_VBI] ; enable DLI's and VBI's sta NMIEN Then after that any VcountWait 120 statements are commented out as not to interfer with the VBI's Vertical Blank Routine VBIHandler jmp XITVBI When I run this code the initial screen draws and the player draws but then it freezes. When I hit F8 in the emulator the disassembled code is pointing to a BRK. Yep, when I told you that I changed the NMI handler that also means that the OS rom is disabled in my version, so probably your "jsr SETVBI" is going nowhere. I think I didn't use the ram under the OS so probably you can switch it back, or never disable it (look for the macro "DisableOperatingSystem"). But if you only need it to set a VBI you could also call your code where I told you before, inside the bottom DLI (maybe you would need to save the X register also, and restore it later). Regards. (Damn.. all this time and I never saw that there was a missing "t" in the title ) Quote Link to comment Share on other sites More sharing options...
TattooRose Posted May 25, 2018 Share Posted May 25, 2018 Thanks for reviewing what I have done so far. As I mentioned eairlier I am trying to re-learn my 6502 assembler after many years of being away from it. I took your advice and have decided to continue with just DLI's. I will move my sound update into the first DLI shortly. My next steps is to define a better char set for the floating platforms taking your advice on adding extra characters and doing "per pixel" movement.. As far as where I put the code for clamping the player to the platform that is in PlayerMethodOverPlatform inside of the StateInPlatform.Asm. I am thinking I need to set a flag there and then process it in the FloatingPlatform.Asm file. Not sure yet. 1 Quote Link to comment Share on other sites More sharing options...
TattooRose Posted June 1, 2018 Share Posted June 1, 2018 (edited) Hi All, I have completed the update to the floating platforms animation and code. I followed NRV’s suggestion of using additional characters and “per pixel” movement. In the current implementation I am now setting a flag in the PlayerMethodOverPlatform method in the StateInPlatform.Asm file called PlayerClamped. I use this in the AnimatePlatformH method in the FloatingPlatform.Asm file. If the flag is set to 1 then I increase/decrease the m_playerLevelLeft_H1 and H2 variables, then I call the SetPlayerInfo method. By doing it this way the animation is a whole lot smoother than before. This is the initial implementation of this code and logic and I know I am probably doing way too much to accomplish this. One problem I do see is that when the player in on the platform the animation of the first and last characters of the platform become jittery. Also, the laser animation seems to slow down. I have posted the code to GITHUB in case anyone would like to look and offer their advice on making it better. Once I have the horizontal platforms working correctly I will turn my attentions to the vertical implementation. One additional note, I have prepped for multiple platforms on one level but for right now it only will work on the first one found. Thanks in advance TR https://github.com/T...se/Scroller.git Edited June 1, 2018 by TattooRose 1 Quote Link to comment Share on other sites More sharing options...
NRV Posted June 2, 2018 Author Share Posted June 2, 2018 Nice! I played the .xex a little, would look at the code later The platform movement is better, don't know yet why the first and last chars have that small jitter. The laser animation slowdown seems to be just a visual thing. You kind of get the same effect when walking left or right. Probably adding more animation frames to the lasers will solve it. Walking over a moving platform seems a little weird sometimes, maybe when doing small movements. Kind of like the player movement cannot keep up with the platform movement. The ladder "attach" point seems perfect now. Regards. Quote Link to comment Share on other sites More sharing options...
+therealbountybob Posted June 2, 2018 Share Posted June 2, 2018 Nice changes in your version. You already have music and sound effects. Is kind of funny seeing Bounty Bob destroyed by a laser Ouch that smarts 1 Quote Link to comment Share on other sites More sharing options...
TattooRose Posted June 3, 2018 Share Posted June 3, 2018 Here is a quick update on the jittery platform. In running the app I noticed that when the player is clamped and the screen is not auto scrolling that there is no jitter. When the camera code begins to auto scroll the screen is when the jittery platform starts. I have not looked at the camera code in detail yet but I will see if there is a way to correct the issue. Once again any help is much appreciated. Thanks, TR Quote Link to comment Share on other sites More sharing options...
NRV Posted June 3, 2018 Author Share Posted June 3, 2018 Two things to look at: - The order of the updates is important, what goes first, the player update or the moving platform update (and the camera update). - The camera has its own speed and acceleration (well, the speed depends on the distance to the player and there is a min and max speeds). Is possible that the jitter comes from the constant "catch up" from the camera to the player's position. Try playing with the speed of the moving platform, or maybe changing the camera logic when the player is on a moving platform. Quote Link to comment Share on other sites More sharing options...
TattooRose Posted June 4, 2018 Share Posted June 4, 2018 I adjusted the platform animation timer to 1 and the jitter does not happen. The platform is moving faster than I would like but for now it seems to have corrected this issue. I did look at the order of animations for the camera, player and platform before that and I did not see a difference. The camera code is updating the addresses in the display list as it scrolls and I did try to leverage that but had no success. Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted December 9, 2021 Share Posted December 9, 2021 You have a nice engine, NRV, but I have some questions: 1. Would it be possible to port it to the 7800 and Lynx if one changed the registers/addresses to the ones in those systems? 2. Can this engine be used to make something in the vein of Castlevania, Ninja Gaiden, Metroid, Mega Man, or Turrican? Quote Link to comment Share on other sites More sharing options...
emkay Posted December 9, 2021 Share Posted December 9, 2021 10 hours ago, SlidellMan said: 2. Can this engine be used to make something in the vein of Castlevania, Ninja Gaiden, Metroid, Mega Man, or Turrican? As long as all the moving objects were aimed to look like squares, yes. 1 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.