+Muddyfunster Posted November 17, 2020 Share Posted November 17, 2020 Is it possible to change the doublewide setting between screens, and by that I mean, really completely different parts of code, like game screen to status screen or instruction screen. I think the easy answer is no, but I wondered if there was any way to work around or do it at all (kind of like with activating kangaroo mode). I would like to be able to use doublewide in game, but perhaps on a screen where I need text, to not have it on so I can use a simple 4px font instead of the large 8px fonts. Quote Link to comment Share on other sites More sharing options...
+Karl G Posted November 17, 2020 Share Posted November 17, 2020 Well, I can tell you how it is enabled/disabled from my source-diving. What I don't know is if there's any side-effects of switching it mid-game. But it looks like it's just a matter of toggling bit 4 of CTRL. Enable doublewide mode: sCTRL{4}=1 CTRL=sCTRL Disable doublewide mode: sCTRL{4}=0 CTRL=sCTRL 2 Quote Link to comment Share on other sites More sharing options...
+Defender_2600 Posted November 17, 2020 Share Posted November 17, 2020 Maybe I didn't understand the question, do you mean something like this? https://atariage.com/screenshot_page.php?SoftwareLabelID=725 Quote Link to comment Share on other sites More sharing options...
RevEng Posted November 17, 2020 Share Posted November 17, 2020 55 minutes ago, Defender_2600 said: Maybe I didn't understand the question, do you mean something like this? Yeah, like that, but the original question above is double/single-wide mixing with reference to 7800basic. I make the game designer choose one or the other, for performance and library bloat reasons. 4 hours ago, Muddyfunster said: I would like to be able to use doublewide in game, but perhaps on a screen where I need text, to not have it on so I can use a simple 4px font instead of the large 8px fonts. Karl has the right under-the-hood info. I think plotchars may work somewhat, though you may need to do some trickery to get the character data right. Either build the string data yourself in a plain data statement, or you might have some luck with using alphadata with the keyword "singlewide" where the documentation says "extrawide" can go. No guarantees on the latter approach, as it's not documented and likely untested. [edit - actually, looking at the source some more, you might be able to just directly use plotchars with inline strings, and use the "singlewide" parameter with plotchars] plotvalue is guaranteed to be broken, so if you need that you'll need to diy your own value plot using plotchars instead. 1 1 Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted November 18, 2020 Author Share Posted November 18, 2020 Thanks guys, Appreciate this is a totally undocumented - might not work properly kind of thing. Going to experiment and see what happens. Thanks again! 1 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted November 30, 2020 Share Posted November 30, 2020 I just wanted to report that I did some fiddling with this myself, and it works as RevEng predicted. After switching to 320A mode and turning off doublewide via CTRL in a bottomscreenroutine, plotchars worked correctly when I added a "singlewide" parameter to plotchars. Setting the displaymode restores doublewide, so it either needs to be disabled after the displaymode statement, or displaymode needs to be bypassed in favor of setting the mode and disabling doublewide in one fell swoop by setting the bits in CTRL directly. Quote Link to comment Share on other sites More sharing options...
Trebor Posted November 30, 2020 Share Posted November 30, 2020 Perhaps splitmode may be useful (?) *EDIT: Ah...I see 'bottomscreenroutine' subroutines are already being tried from the splitmode family. 2 Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted November 30, 2020 Author Share Posted November 30, 2020 2 hours ago, Karl G said: I just wanted to report that I did some fiddling with this myself, and it works as RevEng predicted. After switching to 320A mode and turning off doublewide via CTRL in a bottomscreenroutine, plotchars worked correctly when I added a "singlewide" parameter to plotchars. Setting the displaymode restores doublewide, so it either needs to be disabled after the displaymode statement, or displaymode needs to be bypassed in favor of setting the mode and disabling doublewide in one fell swoop by setting the bits in CTRL directly. Thanks Karl, I was getting some odd outputs but was missing some of the steps you noted. I was going to give up on it for now. Will give it another look. 1 Quote Link to comment Share on other sites More sharing options...
+mksmith Posted December 1, 2020 Share Posted December 1, 2020 Interesting I was just playing around with this myself and thought lets search the forum and here it is!! Will have a play as well ? Quote Link to comment Share on other sites More sharing options...
+mksmith Posted December 1, 2020 Share Posted December 1, 2020 Ok this works for me. I used the topscreenroutine instead as you can occasionally see it revert from double on first draw. I'll add this to my tricks and tips list. @RevEng Thanks Mike - always have some little sneaky tricks available ? set doublewide on set tv ntsc set zoneheight 8 set romsize 48k displaymode 160A rem font (include your char set here) incgraphic gfx/font.png 160A 0 1 characterset font alphachars '0123456789abcdefghijklmnopqrstuvwxyz! >`?/.,:-_()[]&AB@*"#' rem palette P0C1 = $0f rem main MainLoop clearscreen rem flag as singlewide to draw correctly plotchars 'message' 0 0 0 singlewide drawscreen goto MainLoop topscreenroutine rem disable double-wide mode gosub DisableDoubleWideMode return rem -------------------------------------------------------------------------- rem DOUBLEWIDE MODE rem -------------------------------------------------------------------------- EnableDoubleWideMode sCTRL{4} = 1 : CTRL = sCTRL return DisableDoubleWideMode sCTRL{4} = 0 : CTRL = sCTRL return Update Actually it appears that you can just set the state before your displayloop rather than calling it in topscreenroutine/bottomscreenroutine but either way it does what the intended feature requires for using plotchars! I've also been playing with plotmap so if you require doublewide for that then make sure it's turned on by default at compile and de-activate just for your out of gameplay status screens. 3 1 Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted June 1, 2021 Author Share Posted June 1, 2021 I was testing this further with "plotvalue". On certain screens I'm disabling doublewide to use a regular 4 pixel wide charset as described above. Plotchar with with the "singlewide" parameter works perfectly but "plotvalue" does not and double counts the tile it's supposed to plot. I know there is nothing documented about singlewide working with plotvalue. I tried it anyway and it does not appear to work. 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.