Synthpopalooza Posted July 21, 2017 Share Posted July 21, 2017 OK ... another one for you ... I have an assembly language routine for doing music ... Pac-Man-Plus used this in his Bentley Bear game which I did the music for, and I want to repurpose it for my game. I am attaching the .asm listing (the music routines begin at line 306). How would I go about including this into my program? Ideally, I want to be able to call up and play at will any tune or sound which is contained in this .asm file. By the way the music here is the Mario Bros. theme. I'm going to change it for my game of course. mario-title.asm Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3810651 Share on other sites More sharing options...
Mord Posted July 21, 2017 Share Posted July 21, 2017 There's a way to include assembly code into your 7800Basic program. I tinker with inline assembly in my project(s) a bit, although not sure which method would be best for you for a full file worth of code/variables/etc. 1 Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3810760 Share on other sites More sharing options...
Synthpopalooza Posted July 24, 2017 Share Posted July 24, 2017 So ... I am going to be writing my own music subroutine for my game ... how would I go about setting the POKEY chip's AUDCTL register. Would something like this work? asm AUDCTL=$50 end Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3813010 Share on other sites More sharing options...
RevEng Posted July 24, 2017 Author Share Posted July 24, 2017 Because 7800basic can find a POKEY at $450 or $4000, you use an indirect pointer to access POKEY. Also, to avoid name conflicts with TIA, the POKEY registers all have a "P" in front of them. Here's the 7800basic example of setting AUDCTL to $50... pokeybase[[PAUDCTL]]=$50 Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3813080 Share on other sites More sharing options...
Inky Posted July 30, 2017 Share Posted July 30, 2017 I decided to give this a try. There's a certain arcade game that I've wanted to see on a home console, and I am going to attempt to do it. I just hope I don't lose interest like I do everything else I attempt. 2 Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3816983 Share on other sites More sharing options...
Synthpopalooza Posted August 1, 2017 Share Posted August 1, 2017 So, I had an interesting idea ... In my game, I want to cycle three colors of one of the two 160B palettes every cycle. These colors would be put on the blocks to make a sort of animation. Would this work? mytemp1=P0C3 P0C3=P0C2 P0C2=P0C1 P0C1=mytemp1 Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3818001 Share on other sites More sharing options...
RevEng Posted August 1, 2017 Author Share Posted August 1, 2017 The P#C# registers are write-only, so assigning one to another won't work. You'll need 3 real variables that you cycle first, and then assign the 3 variables to the registers. Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3818031 Share on other sites More sharing options...
+SmittyB Posted August 1, 2017 Share Posted August 1, 2017 I fell into that trap when I wanted to decrement the brightness in my colours by saying P0C1=P0C1-1. I couldn't figure it out at the time as Prosystem allowed it but MAME correctly did not. In the end I now have a small section of RAM to hold the colours I want and a subroutine to set them. It means I can do all sorts of mathematical functions on them if I wanted to. 1 Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3818196 Share on other sites More sharing options...
Synthpopalooza Posted August 1, 2017 Share Posted August 1, 2017 Another reason to get MAME working for me, or a way to develop on real hardware. Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3818362 Share on other sites More sharing options...
Synthpopalooza Posted August 3, 2017 Share Posted August 3, 2017 OK, frustration ... I am hitting my head against a wall, rather like my poor rocketman in this example: He is supposed to hover at the top of the screen however, instead he triggers a fall and doesn't hover. If he is standing on a different platform, like here, it works properly: When he is at the very top, he also hovers without problem: I am literally at my wit's end as to what to do about this. I am attaching the code ... for some reason, when he stands on the 4th row of a level, it causes this behavior. Attaching binary, .a78, and .bas file ... it also seems the color cycling is not working on real hardware. The blocks should be cycling colors. Any ideas? ramcharmap3g(7).bas.bin ramcharmap3g(7).bas.a78 ramcharmap3g(7).bas Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3819435 Share on other sites More sharing options...
Synthpopalooza Posted August 3, 2017 Share Posted August 3, 2017 Actually, I seem to have solved that problem ... nevermind. But I am wondering, how can I detect blocks when he is hovering at the top, like this: What I want to happen is, when he is hovering and he hits the blocks that are at the top, for it to register as a hit and he begins falling ... plus the block changes color if it needs changing, or it triggers a player death if it is a trap at the top. Basically, as though he had flown and hit it from below. Attaching the new code and binaries: ramcharmap3g(7).bas ramcharmap3g(7).bas.a78 ramcharmap3g(7).bas.bin Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3819446 Share on other sites More sharing options...
RevEng Posted August 4, 2017 Author Share Posted August 4, 2017 But I am wondering, how can I detect blocks when he is hovering at the top, like this: It sounds like you want an extra coordinate character check, but only when the rocketman has a very small y. (near the top of the screen) The same sort of coordinate you're doing when you're looking for a character underneath the player, but instead offset to the left or right top corner of the rocketman sprite. Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3820689 Share on other sites More sharing options...
Synthpopalooza Posted August 4, 2017 Share Posted August 4, 2017 Yes. Currently I am doing two coordinate checks when flying ... one underneath his feet and one above his head. I wanted to modify the head one for when he is at or near the top of the screen but so far haven't had success. I will try some more ideas this weekend. Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3820693 Share on other sites More sharing options...
Synthpopalooza Posted August 8, 2017 Share Posted August 8, 2017 So anyway ... I tried to import a 160A tileset into my game ... the one below: And I modified my code to account for this ... this is what I am coming up with: The Graphics are wrong, and they are in the wrong display mode (still 160B). I am attaching my program listing, can you tell me what I am doing wrong? ramcharmap4.bas Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3823018 Share on other sites More sharing options...
Synthpopalooza Posted August 8, 2017 Share Posted August 8, 2017 (edited) The other question I have is: Do I have to modify my code for 160A in regards to peekchar and pokechar? Do the character values line up? As it stands now I have value 4 for the left half of the block and value 6 for the right. Edited August 8, 2017 by Synthpopalooza Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3823027 Share on other sites More sharing options...
RevEng Posted August 8, 2017 Author Share Posted August 8, 2017 Try using "characterset level1_160A_tileset" before the plotmap command. The plot commands takes on whatever mode the declared characterset is. Bear in mind that using "plotmap" instead of "plotmapfile", it means all of your characters in the whole map will use the same palette. There should be only minimal changes if you go from 160A single-wide to 160B double-wide. The character index values you peek and poke will be half of what the old 160B values will be. Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3823032 Share on other sites More sharing options...
Synthpopalooza Posted August 8, 2017 Share Posted August 8, 2017 (edited) OK, some progress: Problems now are: Color cycling is still not working properly. The first 2 color registers P0C1 and P0C2 cycle, but P0C3 does not. (EDIT: Nevermind, fixed it!) Scoring display is now messed up ... I am sure it involves doublewide mode somehow, but not sure how to fix it. Also: Missile and Player now show up on the same line. One question: How would I go about doing a pokechar to the screen but have the block show up in a different palette? ramcharmap4.bas ramcharmap4.bas.bin ramcharmap4.bas.a78 Edited August 8, 2017 by Synthpopalooza Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3823040 Share on other sites More sharing options...
Mord Posted August 8, 2017 Share Posted August 8, 2017 (edited) looks like you turned doublewide off since the previous version. This makes it grab half as much data per character, and likely alters where it's grabbing the data from. If you need doublewide turned off for the rest of the sprites, then I guess you'd have to re-think the offsets in the font used for your menu. (At the very least the string you get it to write would require twice as many character references, and the references would be different from when doublewide was on. "A" wouldn't be "A" anymore in the string so to speak.) Edited August 8, 2017 by Mord Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3823161 Share on other sites More sharing options...
RevEng Posted August 8, 2017 Author Share Posted August 8, 2017 One question: How would I go about doing a pokechar to the screen but have the block show up in a different palette? You can't change the palette via pokechar. This only changes the character index at a location, and Maria doesn't change palettes based on the character index. Maria determines the color palette by the display list object, and in this case the display list object is a wide group of characters. This is what I was going on about earlier. Think of each plotmap command as a stamp, and you can only dip it in one inkpad (palette) for each screen area. Right now you have 2 stamps, covering the left and right halves of the screen. If you want more palettes, you need to break up your 2 stamps into different combinations of smaller stamps... per level. This would be tedious, so I was recommending using tiled and plotmapfile for your level design. plotmapfile will break up your map file into different stamps all on it's own. You still won't be able to practically change a character's palette on the fly, but at least your level designs will be able to have 1 palette per block type. Or you could try the other solution to your DMA problem, keeping the 160B tiles and trimming the plotmap width by 2 or 4 characters. Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3823246 Share on other sites More sharing options...
Synthpopalooza Posted August 8, 2017 Share Posted August 8, 2017 (edited) What if I were to use a pokechar of 0 at the character location followed by a plotchar command of the character in the palette that I want? I think ultimately I will end up using plotmapfile ... I still need a way of changing the colors of the blocks on the fly though and I wondered if plotchar would do the trick. Maybe have the changed blocks from a different incgraphics block and use the charset command. Edited August 8, 2017 by Synthpopalooza Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3823327 Share on other sites More sharing options...
Synthpopalooza Posted August 8, 2017 Share Posted August 8, 2017 (edited) The other question is the scoring display. I had wondered if using the topscreen routine to set the top row to 160B in double wide would fix this problem? Or using the extrawide function in alphadata? Edited August 8, 2017 by Synthpopalooza Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3823346 Share on other sites More sharing options...
Mord Posted August 8, 2017 Share Posted August 8, 2017 The other question is the scoring display. I had wondered if using the topscreen routine to set the top row to 160B in double wide would fix this problem? Or using the extrawide function in alphadata? Unfortunately the doublewide parameter is set at compile time with the setdoublewide command and can't be changed - it physically changes some of the commands of 7800Basic that get baked into the rom for determining offset locations. So it'll be always on for everything, or always off for everything. Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3823456 Share on other sites More sharing options...
RevEng Posted August 8, 2017 Author Share Posted August 8, 2017 Your choices here are to either plot on top of existing characters, or redraw the screen. The former will cause you to run out of DMA if there's a lot of changes in a zone, the latter will cause a lag during block changes (if double buffering is used) or be visible and lag (if regular drawscreen is used) If you change the characterset, all the graphics will change in one instant. As mord says, the doublewide parameter is baked in. If you don't use doublewide, you can simulate it with some plot functions that have the extrawide parameter. Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3823683 Share on other sites More sharing options...
Synthpopalooza Posted August 9, 2017 Share Posted August 9, 2017 If you change the characterset, all the graphics will change in one instant. So this means that issuing a characterset command will affect the characters already in the plotmap? Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3824226 Share on other sites More sharing options...
RevEng Posted August 9, 2017 Author Share Posted August 9, 2017 So this means that issuing a characterset command will affect the characters already in the plotmap? Correct. Maria only knows of one characterset at any one time. The only exception would be changing the characterset during the visible screen display, at which point one set of characters would be used above the change, and another set of characters would be used below the change. Quote Link to comment https://forums.atariage.com/topic/222638-7800basic-beta-the-release-thread/page/28/#findComment-3824236 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.