ΞΜΜΜ̈ˆˆ¬ͺͺͺ¬ˆˆˆ¬ΜΜΜ¬ΜΐΜ¬ΜΐΜ¬ΜΐΜΜΜμΜξͺͺΐΐξΜ¬ΐΜΐ¬ΐΐΐ¬ΐΐΐ¬ΐΐΞΜΜΜ̈ˆˆ¬ͺͺͺ¬ˆˆˆ¬ΜΜΜ¬ΜΜΜ¬ΜΐΜ¬ΜΐΜΜΜμΜξͺͺΐΐξΜ¬ΐΜΜ¬ΐΐΐ¬ΐΐΐ¬ΐΐ¬ΜΜΜ¬ͺͺͺ¬ͺ¬ͺ¬ͺΚΜ¬ͺͺͺŒˆˆˆΜΐΜΞΜΜΞΜ¬Μͺͺΐμ¬ͺΐξͺͺΐξͺͺΐΜξΐμξΜΜξξ¬ΜΜΜ¬ͺͺͺ¬ͺ¬ͺ¬ͺΚΜ¬ͺͺͺŒˆˆˆΜΐΜΞΜΜΞΜ¬Μͺͺΐμ¬ͺΐξͺͺΐξͺͺΐΜξΐμξΜΜξξ >ΐ?""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""ΑΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜ""""""""""""""""ΑΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜ""""""""""""""""ΑΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜ""""""""""""""""ΜΜ̈ˆˆˆˆˆˆˆˆˆˆˆˆˆˆΜΜΜ""""""""""""""""ΜΜ̈ˆˆˆˆˆˆˆˆˆˆˆˆˆˆΜΜΜ""""""""""""""""ΜΜ̈ˆˆˆˆˆˆˆˆˆˆˆˆˆˆΜΜΜ""""""""""""""""Μ¬ͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺΐΜ""""""""""""""""Μ¬ͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺΐΜ""""""""""""""""Μ¬ͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺΐΜ""""""""""""""""Μ¬ͺˆˆˆˆˆˆˆˆˆˆˆˆˆ¨ͺΐΜ""""""""""""""""Μ¬ͺˆˆˆˆˆˆˆˆˆˆˆˆˆ¨ͺΐΜ""""""""""""""""Μ¬ͺˆˆˆˆˆˆˆˆˆˆˆˆˆ¨ͺΐΜ""""""""""""""""Μ¬ͺΜΜΜΜΜΜΜΜΜΜΜΜΜ¬ͺΐΜΜΜΜ""""""""""""""""Μ¬ͺΜΜΜΜΜΜΜΜΜΜΜΜΜ¬ͺΐΜΜΜΜ""""""""""""""""Μ¬ͺΜΜΜΜΜΜΜΜΜΜΜΜΜ¬ͺΐΜΜΜΜ""""""""""""""""Μ¬ͺΜΜΜΐΜΜΜΜΐΜΜ¬ͺΐΜΐΜ""""""""""""""""Μ¬ͺΜΜΜΐΜΜΜΜΐΜΜ¬ͺΐΜΐΜ""""""""""""""""Μ¬ͺΜΜΜΐΜΜΜΜΐΜΜ¬ͺΐΜΐΜ""""""""""""""""Μ¬ͺΜΜΜΐΜΜΜΜΐΜΜ¬ͺΐΜΐΜ""""""""""""""""Μ¬ͺΜΜΜΐΜΜΜΜΐΜΜ¬ͺΐΜΐΜ""""""""""""""""Μ¬ͺΜΜΜΐΜΜΜΜΐΜΜ¬ͺΐΜΐΜ""""""""""""""""Μ¬ͺΜΜΜΐΜΜΜΜΐΜΜ¬ͺΐΜΐΜ""""""""""""""""Μ¬ͺΜΜΜΐΜΜΜΜΐΜΜ¬ͺΐΜΐΜ""""""""""""""""Μ¬ͺΜΜΜΐΜΜΜΜΐΜΜ¬ͺΐΜΐΜ""""""""""""""""Μ¬ͺΜΜΜΜΜΜΜΜΜΜΜΜΜ¬ͺΜΜΜ""""""""""""""""Μ¬ͺΜΜΜΜΜΜΜΜΜΜΜΜΜ¬ͺΜΜΜ""""""""""""""""Μ¬ͺΜΜΜΜΜΜΜΜΜΜΜΜΜ¬ͺΜΜΜ""""""""""""""""Μ¬ͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺΐΜΜ""""""""""""""""Μ¬ͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺΐΜΜ""""""""""""""""Μ¬ͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺΐΜΜ""""""""""""""""Μ¬ͺͺͺͺΜ¬ͺͺͺͺΜ¬ͺͺͺͺΐΜ""""""""""""""""Μ¬ͺͺͺͺΜ¬ͺͺͺͺΜ¬ͺͺͺͺΐΜ""""""""""""""""Μ¬ͺͺͺͺΜ¬ͺͺͺͺΜ¬ͺͺͺͺΐΜ""""""""""""""""Μ¬ͺͺͺͺͺΚΜΜΜΜͺͺͺͺͺͺΐΜ""""""""""""""""Μ¬ͺͺͺͺͺΚΜΜΜΜͺͺͺͺͺͺΐΜ""""""""""""""""Μ¬ͺͺͺͺͺΚΜΜΜΜͺͺͺͺͺͺΐΜ""""""""""""""""Μ¬ͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺΐΜ""""""""""""""""Μ¬ͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺΐΜ""""""""""""""""Μ¬ͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺΐΜ""""""""""""""""̌ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆΜΜΜ""""""""""""""""̌ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆΜΜΜ""""""""""""""""̌ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆΜΜΜ""""""""""""""""ΜΜΜΐΜΜΜΜΐΜΜ""""""""""""""""ΜΜΜΐΜΜΜΜΐΜΜ""""""""""""""""ΜΜΜΐΜΜΜΜΐΜΜ""""""""""""""""ΑΜΜΜΜΜΜΜΑΜΜΜΜΜΜΜ""""""""""""""""ΑΜΜΜΜΜΜΜΑΜΜΜΜΜΜΜ""""""""""""""""ΑΜΜΜΜΜΜΜΑΜΜΜΜΜΜΜ""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""έέΡΡΡέ""""""""""""""""έέέέέέΡέέέέ""""""""""""""""έέέΡΡέέέ""""""""""""""""έέΡΡέέέέ""""""""""""""""έέΡέέέΡέέέ""""""""""""""""""""""""""""""""ΡΡΡΡέέΡ""""""""""""""""ΡέΡέΡ""""""""""""""""ΡέΡέΡέέ""""""""""""""""ΡΡέέέΡ""""""""""""""""ΡΡΡέέΡέέΡ""""""""""""""""έ""""""""""""""""ΡΡέΡέΡ""""""""""""""""έέΡέέέΡέΡέΡέέέΡέέΡέέέέΡέέέΡ""""""""""""""""ΡέΡέΡΡέΡέΡΡΡΡΡΡΡέΡέΡΡΡέΡ""""""""""""""""ΡέΡέέέέέέΡέΡΡΡΡΡΡέΡέΡΡέ""""""""""""""""έΡέέΡέΡΡΡέέΡέέΡέέέΡΡέΡ""""""""""""""""ΡέΡέ""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""R-- title: 4:3 screen fit system -- author: profpatonildo -- desc: Screen fit system for 4:3 -- script: lua --[[ Tic-80's screen aspect ratio isn't a good fit for devices with 4:3 screens, like the Rg351v, by Anbernic. With this system, you can make your game fit better in such devices. Here's how it works: 1. "fit" enables the system; 2. "fitx" offsets coordinates; 3. "fitw" is the desired width; 4. "fitcol" is the border color; 5. "fit_screen()" can be called to clip the drawing region. Default values have been calculated to make the game use almost all the screen space of the Rg351v: The system clips 16 pixels from each side of the game screen, making it a better fit for 4:3 screens. The resulting game screen is 208 pixels wide (26 8x8 tiles wide), so take that into account when designing your games for this system. In Retroarch, the Tic-80 emulator core must be configured to: 1. Enable integer scale; 2. Enable integer scale overscale. You can find those settings on the Retroarch menus, under: Settings -> Video -> Scaling In this demo, the fitting can be toggled with the A(Z) button. For a real game, it would be more sensible to have the option on a system menu. The variables are simple to modify if you want to use this system for different aspect ratios. If you find this helpful, consider buying me a coffee: https://ko-fi.com/profpatonildo70266 I would really appreciate that! :) --]] t=0 x=96 y=24 -- fit system!! fit=false fitx=16 fitw=208 fitcol=2 function fit_screen() cls(fitcol) if fit then clip(fitx,0,fitw,136) else clip() end end -- function TIC() if btn(0) then y=y-1 end if btn(1) then y=y+1 end if btn(2) then x=x-1 end if btn(3) then x=x+1 end -- fit system! if btnp(4) then fit=not fit end fit_screen() -- cls(1) spr(1+t%60//30*2,x,y,14,3,0,0,2,2) print(" Button A\n (Key Z)\n to toggle borders!",64,84,13) t=t+1 end function OVR() -- fit system! local _x=0 if fit then _x=fitx end -- print("Border active: "..tostring(fit),4+_x,4,13) end