+SmittyB Posted August 29, 2017 Share Posted August 29, 2017 Speaking of bankswitching is there an example of a bare-bones program using it? I may want to convert to bankswitching but I don't know how well it would work for me and I think I'd have to do a lot of restructuring of my code. Do plotted graphics/banners stay the same once drawn or do they change too if the bank is switched out? If not would it be possible to store graphics across multiple banks, swapping between them to draw everything, as long as the graphics for tiled characters are duplicated across each? Quote Link to comment Share on other sites More sharing options...
RevEng Posted August 29, 2017 Author Share Posted August 29, 2017 Looks I don't have an example right now. I'll have to fix that when I get a chance. The syntax is pretty straightforward... set romsize 128k rem we always start in bank 1. no need to declare it. [a bunch of code] goto maingame bank2 bank 2 maingame [a bunch of code that belongs to bank 2] bank 4 rem we skipped bank 3, so it's empty [a bunch of code for bank 4] bank 8 rem this is the last bank in the rom. it's always present Do plotted graphics/banners stay the same once drawn or do they change too if the bank is switched out? If not would it be possible to store graphics across multiple banks, swapping between them to draw everything, as long as the graphics for tiled characters are duplicated across each? Any graphics displayed from the current bank will change when you bankswitch. If you plan ahead, as you suggest, you can use this to replace the graphics for different game levels/areas. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 4, 2017 Share Posted September 4, 2017 OK, I am having problems again ... I am trying to put in a table to read starting values for the player's sprite, which will change each level. When I compile, the compiler barfs ... and this is what I get back: 7800basic compilation complete.User-defined 7800.asm found in current directoryold value: $0190 new value: $0144old value: $018c new value: $0143old value: $018a new value: $0142old value: $0188 new value: $01417800basic_variable_redefs.h (384): error: EQU: Value mismatch.7800basic_variable_redefs.h (386): error: EQU: Value mismatch.7800basic_variable_redefs.h (388): error: EQU: Value mismatch.7800basic_variable_redefs.h (390): error: EQU: Value mismatch.C:\Users\Coddington\Downloads\7800basic\ramcharmap5a.bas.asm (5098): error: Value in 'lda (startposdata),y' must be <$100.C:\Users\Coddington\Downloads\7800basic\ramcharmap5a.bas.asm (5106): error: Value in 'lda (startposdata),y' must be <$100.Unrecoverable error(s) in pass, aborting assembly!Complete.Cartridge data file must be at least 4K!7800header 0.7 Jun 6 2017 19:03:32*** ERROR: The file size of C:\Users\Coddington\Downloads\7800basic\ramcharmap5a.bas.bin is 0 bytes. ramcharmap5a.bas ramcharmap5a.bas.asm Quote Link to comment Share on other sites More sharing options...
RevEng Posted September 4, 2017 Author Share Posted September 4, 2017 Looks like I need to add this to the documentation... the variable(s) you use with sdata needs to be based on the a-z ones, not var### or other locations. The underlying technical reason is sread/sdata uses 6502 indirect addressing, and so they need zero-page memory. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 4, 2017 Share Posted September 4, 2017 Well, snap ... time to retool things. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 5, 2017 Share Posted September 5, 2017 I have some questions about the 320C and 320D modes. I.am thinking of doing some graphics mode experiments. * Which palettes are referenced in these modes, and which character columns are they used in? * How many pixels wide per character, single and double wide? * What is the DMA overhead on these modes compared to 320A and 320B? * If I were to design an incgraphics png, do I place the appropriate colors in the appropriate colum, and 7800basic will sort it out? I have an idea for a 16 color 320 mode but I need this info to see if I can do it. Quote Link to comment Share on other sites More sharing options...
RevEng Posted September 5, 2017 Author Share Posted September 5, 2017 I have some questions about the 320C and 320D modes. I.am thinking of doing some graphics mode experiments. * Which palettes are referenced in these modes, and which character columns are they used in? * How many pixels wide per character, single and double wide? These are covered in the Graphics Mode table in the 7800basic Guide. * What is the DMA overhead on these modes compared to 320A and 320B? Technically DMA timing doesn't actually differ between modes. What does differ is the number of pixels any given graphics character/byte will display, so some modes let you cover the same screen area with fewer bytes. (and therefore incur less DMA penalty) To compare the pixel-to-byte efficiency, just look at the "width of 1 character" info in the previously mentioned Graphics Mode table. A mode that displays 4 pixels per byte, will use ~1/2 the DMA time (to cover the same area) compared to a mode that displays 2 pixels per byte. * If I were to design an incgraphics png, do I place the appropriate colors in the appropriate colum, and 7800basic will sort it out? I have an idea for a 16 color 320 mode but I need this info to see if I can do it. Yes, it will sort it out. Just bear in mind that 7800basic can't stop you from breaking the rules in your PNG. If you're wanting to flicker modes, either the character width will need to be identical between the 2 modes, or you'll need to also update the character map every other frame. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 5, 2017 Share Posted September 5, 2017 (edited) The idea I had runs something like this ... The 320C mode requires every 2 pixel columns to be of the same palette ... so: * Put monochrome values $03,$09,$0f into palette #1 * put $49, $89, $b9 into palette 4. (Red green blue) Then on each cycle: * Swap character sets * Swap the palettes out so that palette 1 becomes chroma and palette 4 becomes luma. I believe by doing this you can get a 320 pixel mode at 16 colors, the two color palettes will interlace on the vertical columns to avoid full frame flicker. I may try it tonight ... Edited September 5, 2017 by Synthpopalooza Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 6, 2017 Share Posted September 6, 2017 OK, question about displaying scores: I tried to add score functionality to my code, but it seems not to update the score ... nothing gets printed. It should update by 100 when a block is painted, 500 when a coin is picked up, 1000 when the adrenaline pill on level 10 is picked up, or 1000 when a level is completed. I wonder if you could have a look at the code and see what I am doing wrong. The idea is, I want to print all 6 digits of the score0 variable at location 0,1 (including the leading zeros, if any) using palette 1, everytime the score is updated. ramcharmap5c.bas ramcharmap5c.bas.a78 ramcharmap5c.bas.bin Quote Link to comment Share on other sites More sharing options...
Mord Posted September 6, 2017 Share Posted September 6, 2017 Not sure what's wrong with it myself, it seems to display fine. (note: I'm looking at it with prosystem, which can be kinda off at times in certain situations) Got a screenshot for what you're seeing? Quote Link to comment Share on other sites More sharing options...
RevEng Posted September 6, 2017 Author Share Posted September 6, 2017 Also seems to be displaying fine in a7800. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 6, 2017 Share Posted September 6, 2017 On my end, every time you paint a block or pick up an item, the score doesn't update and show how many points you have. I will have a look later today and get a screenshot. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 6, 2017 Share Posted September 6, 2017 Going back to 320D ... It looks promising as a 4 color alternative to 320B if we use flickering, as it seems to use less bytes than 320B per character. The other question I have is: Does this mode allow you 8 unique palette settings like 320A? How are the colors mapped out? For example, would palette 1 map out like this: Even columns = P1C0 P1C1 Odd columns = P1C2 P1C3 and is this mapping constant for the other 7 palettes? Quote Link to comment Share on other sites More sharing options...
Mord Posted September 7, 2017 Share Posted September 7, 2017 Going back to 320D ... It looks promising as a 4 color alternative to 320B if we use flickering, as it seems to use less bytes than 320B per character. The other question I have is: Does this mode allow you 8 unique palette settings like 320A? How are the colors mapped out? For example, would palette 1 map out like this: Even columns = P1C0 P1C1 Odd columns = P1C2 P1C3 and is this mapping constant for the other 7 palettes? Just doublechecked info from the maria document I have, but unfortunately you don't have access to all 8 palettes in 320D. Just like in 320B, which it's based on, only the top palette bit is used for determining palette so you only get palette P0 and P4. (My world was crushed when I realized that for 320B way back. ) 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 7, 2017 Share Posted September 7, 2017 (edited) So that means we get p1/p4 and then the reverse, p4/p1? Not bad ... the equivalent of 320B, two unique palettes, and through flickering you get the same colors as 320B but with less DMA overhead. Edited September 7, 2017 by Synthpopalooza Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 8, 2017 Share Posted September 8, 2017 Ok a question about arrays and bitwise variables ... playerflags[0] accesses it as an array. playerflags{0} accesses it as bitwise. Is there anyway to do both at the same time? E.g. playerflags[0]{0} ... Quote Link to comment Share on other sites More sharing options...
RevEng Posted September 8, 2017 Author Share Posted September 8, 2017 No. You'd have to use an intermediate variable to do that... temp1=playerflags[0]:temp1{0}=1:playerflags[0]=temp1 ...but it's generally more efficient to use bitwise operations instead of bitwise arrays, which you can use with arrays. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 11, 2017 Share Posted September 11, 2017 OK, more problems ... #1: The coin counter is not updating properly ... it shows "100" when one coin is picked up, then shows nothing if more than 10 are picked up. #2: My player seems to explode and lose a life immediately when the binary is first run ... any ideas on what is triggering this? ramcharmap5b.bas ramcharmap5b.bas.a78 ramcharmap5b.bas.bin Quote Link to comment Share on other sites More sharing options...
peteym5 Posted November 15, 2017 Share Posted November 15, 2017 The Inline assembly, what conventions is it using and what is valid? statements like dta, .db,.dw, and many others are not working. I am porting over .asm modules that MADS ASSEMBLER is able to compile. I know XASM conventions are slightly different. Quote Link to comment Share on other sites More sharing options...
RevEng Posted November 20, 2017 Author Share Posted November 20, 2017 Been a bit busy lately, and just checking in. @peteym5... The underlying compiler for 7800basic is DASM, which is often used in the 7800 and 2600 scene. There's a (somewhat incomplete) DASM syntax page here. For byte data, the DASM command would be ".byte" or "dc.b". Use quotes around text for encoding strings. For words, you can use ".word" or "dc.w". There isn't an equivalent pseudo op to the MADS DTA. You'd specify the data types as above. @synthpop... Are you still stuck with these issues? Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted November 24, 2017 Share Posted November 24, 2017 No I got those issues sorted. Currently working on bank switching at the moment. 1 Quote Link to comment Share on other sites More sharing options...
peteym5 Posted December 13, 2017 Share Posted December 13, 2017 "UNRESOLVED SYMBOL LIST" needs to list what the unresolved symbols are during compile. When programs start getting longer and more complicated, it becomes too tedious to go through hundreds of lines of source code to find the label name that may be a typo, spelled wrong, or not defined yet. Quote Link to comment Share on other sites More sharing options...
RevEng Posted December 13, 2017 Author Share Posted December 13, 2017 It does list the unresolved symbols. There is extra output due to 7800basic symbols that haven't resolved, and don't need to, so perhaps your typo was amidst that list. Normally 7800basic filters out it's own symbols from that list, but lately I've worked on features without updating the filter list. I'll update it, next release. Quote Link to comment Share on other sites More sharing options...
+SmittyB Posted December 13, 2017 Share Posted December 13, 2017 That'll make identifying those typos a little easier. If I could request a feature it would be a version of plotmap with fine Y placement. I know this would be considerably harder to implement and manage compared to the existing plotmap, but I think fine vertical scrolling would make a big difference to the kinds of games that can be written providing the programmer is aware of the extra strain that it would add. Quote Link to comment Share on other sites More sharing options...
Mord Posted December 14, 2017 Share Posted December 14, 2017 The only thing left with the fine vertical scrolling demo I have posted is to get the CHARBASE register updated reliably at the proper time. I'm pretty sure I was on the right track for getting it done, but there's still work that needs to be done. 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.