+mksmith Posted January 7, 2019 Share Posted January 7, 2019 Hi, I'm working on my DPC+ game and it's all starting to get a bit large to easily edit. Can you separate each bank's code into it's own files and merge it back together on compile? I've looked at include, includesfile and inline and these don't appear to work in this situation. Any suggestions? Thanks! Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted January 7, 2019 Share Posted January 7, 2019 are you using Visual bB? You can set bookmarks to switch between areas of code you edit often. Quote Link to comment Share on other sites More sharing options...
RevEng Posted January 7, 2019 Share Posted January 7, 2019 [...]Can you separate each bank's code into it's own files and merge it back together on compile? A bB program can only include assembly programs, not other bB programs. This functionality isn't impossible, but would require a fair bit of restructure for bB to accomplish. As Muddyfunster suggests, you can use vbb or whatever editor supports bookmarks. I use "section descriptions" that are easily searched in my editor of choice. (vi) Or you could split your source apart into separate files, and combine it right before compiling with a custom batch-file/shell-script. Quote Link to comment Share on other sites More sharing options...
Lillapojkenpåön Posted January 7, 2019 Share Posted January 7, 2019 I saw your request for a way to easily change what sprite data is pointed to yesterday, I have made a nice and simple example (with alot of help) that does that, and color data to, I will post it soon. 1 Quote Link to comment Share on other sites More sharing options...
+mksmith Posted January 7, 2019 Author Share Posted January 7, 2019 (edited) Thanks guys - yeah using VbB so will check out bookmarks. Would be great to have that ability though. @Lillapojkenpåön - I've got a bit of a process built now (see here) but would love to see any other examples of the sprite/color stuff. bB has some interesting things you can do but also what you have to work around. The biggie for me now is the 256b limit for data tables and whether there is a way to work around that - otherwise there is a bit of if then checking to work out the data pointers. I did find a macro can give a bit of flexibility around setting stuff from pointers: macro SetPlayer0Frame rem {1}=datapointer {2}=frame rem set data pointer asm LDX #<{1} STX temp5 end rem set frame player0pointerlo = temp5+({2}*Height) asm LDA #((>{1}) & $0f) | (((>{1}) / 2) & $70) STA player0pointerhi end end macro SetPlayer1To9Frame rem {1}=datapointer {2}=spritenumber {3}=frame rem set datapointer asm LDX #<{1} STX temp5 end rem load sprite pointer asm LDA #<(playerpointers+({2}*2)) STA DF0LOW LDA #(>(playerpointers+({2}*2))) & $0F STA DF0HI end rem set frame DF0WRITE = temp5+({3}*Height) asm LDA #((>{1}) & $0f) | (((>{1}) / 2) & $70) STA DF0WRITE end end Edited January 7, 2019 by mksmith 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.