From fa4bbacf3a4fd7921e527bde9c2278348aa6073e Mon Sep 17 00:00:00 2001 From: InvisibleUp Date: Wed, 1 Jul 2020 22:11:38 -0400 Subject: [PATCH] Start implementing "config mode" graphics I still need to re-do most of the rendering system to throw out all the jank, but this feels like a half-decent start imo. Yes, every page is just a separate .png file. I'm lazy. That works. --- gfx/bootdlg/base.png | Bin 0 -> 3843 bytes gfx/bootdlg/model.png | Bin 0 -> 3897 bytes gfx/bootdlg/model_se30.png | Bin 0 -> 2845 bytes gfx/bootdlg/start.png | Bin 0 -> 3296 bytes meson.build | 48 +++--- src/HW/SCREEN/SCRNMAPR.c | 53 +++++++ src/HW/SCREEN/SCRNMAPR.h | 181 ++-------------------- src/UI/CONFIGM.c | 22 +++ src/UI/CONFIGM.h | 11 ++ src/UI/{ => _deprecated}/WIN32/DBGLOG.c | 0 src/UI/{ => _deprecated}/WIN32/INTLKBRD.c | 0 src/UI/{ => _deprecated}/WIN32/KEYBOARD.c | 0 src/UI/{ => _deprecated}/WIN32/OSGLUWIN.c | 0 src/UI/{ => _deprecated}/WIN32/OSGLUWIN.h | 0 src/UI/{ => _deprecated}/WIN32/SOUND.c | 0 src/UI/{ => _deprecated}/WIN32/SOUND.h | 0 src/UI/{ => _deprecated}/WIN32/TIMEDATE.c | 0 17 files changed, 120 insertions(+), 195 deletions(-) create mode 100644 gfx/bootdlg/base.png create mode 100644 gfx/bootdlg/model.png create mode 100644 gfx/bootdlg/model_se30.png create mode 100644 gfx/bootdlg/start.png create mode 100644 src/HW/SCREEN/SCRNMAPR.c create mode 100644 src/UI/CONFIGM.c create mode 100644 src/UI/CONFIGM.h rename src/UI/{ => _deprecated}/WIN32/DBGLOG.c (100%) rename src/UI/{ => _deprecated}/WIN32/INTLKBRD.c (100%) rename src/UI/{ => _deprecated}/WIN32/KEYBOARD.c (100%) rename src/UI/{ => _deprecated}/WIN32/OSGLUWIN.c (100%) rename src/UI/{ => _deprecated}/WIN32/OSGLUWIN.h (100%) rename src/UI/{ => _deprecated}/WIN32/SOUND.c (100%) rename src/UI/{ => _deprecated}/WIN32/SOUND.h (100%) rename src/UI/{ => _deprecated}/WIN32/TIMEDATE.c (100%) diff --git a/gfx/bootdlg/base.png b/gfx/bootdlg/base.png new file mode 100644 index 0000000000000000000000000000000000000000..77e8761eb10c7c1960be4e97299adabbc545a821 GIT binary patch literal 3843 zcmai13p`a>7hmUG$LmTeT_!hFlayy~8IL;?Jw#NZ5VtX*?xzTetDKr%64g|Cqa>!h z8icreh9TI>H`YwZ(ew|?~``5E#6 zFlp@?i;Vy{YGMwu(&(kJdTs>j`0iY}(r%}_JAn4tfU~CS3hk7SHQu(e)S2$DglI=|#$f|0^F{Z?o$LJ?Z`C+C^{Sp|hl|VgY)m0#-=PXm=hs#% z@qqP>_+wZUIc-67DK8ZzcnAbE?&>a17=lL6X_^hqJY)`MYK6XFM z-FXZPPC6}Y`Z(D0tKxj4KeqK9mjS~IVqs%ERp>>JHkrgB%;m`nNsj=qgHx;G zP;UVMiE||rH(&tDKo8D{KwOChRkT`#mpzg=i2CIQXj)?Mc#2eh{xV_6Q4B&H%*?Y& zT8=YG^rbfoY6}+vC_Qc#!WJcOR52Wb;*vRUE944V<*K z1p(j1n|s#dNMLYsa76q>QZHZf=?tEhDPS{@NdPVmkpKKeVYMvux-p!dZ0aO@2GnwQ z6)C?KfMFme8)!i4#58@V5xXMg@2_lC1(3A|C*gJ`l`AJ`P8_vOEw!pwgNEzw$Bd;# zC2}L38RMm^kt2+2GSnGLA9Tsg@b)VGJO)hRah|>ZGT)Hk21W3Ma$6{5fHv(%3vK8h z$2iEn1lK(z(iJLeq6$izBi(C5kMYyRYAL&bd7q(jF><+?29`7 zopfyfV!hM#!3L3P^lk{Xt=H$%iXweu>DT90?foyUFYroCqYb02Lr#}S(+^~^FO%vC zoZGdyqUuS5>uAGKd9W}5y`CTyLiE)1rE7ombb#Rcuzd&)8o8#$+f4rzVVe3=_wvb* zUQI^b3wMV~mGMp~{mTplo0qAyC^rjF3nU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Z ztE3pWiMTvP7M#i76TM7qqX6@nv^_5i>%-^6*mi;At9jKwEObnNZIAD_Nd;C2j*qbc zrcdgrXc9h_6fxea%`3s+ZWOk7>eGi6X>+rh05Brt`&L)~xS+*X1%g|jCMzYf48k%G zT!HkIJ$1BF)r4PJFwZ*Sw@NZOi}PDM-QG*;g;llFGS-ty!N7yt5L%*6X`#Kk+j(O>J*D3PwVDr;71_5A!-!B`R zlvlQ>3;G8GB?8_noYd0m2`wS|H5r72iKgc2HNddjg{1RRr!$F=WeRd<{98EMN;ii5 z-nIGKa3gR8z$f?HH0_%+p3(U@U9Ij|4)t05gng3psTDy0oj13B$7ELvd`A#_6$`kr z>#c*q*IeUKeE<~P4IUD{w(Y}!i6#TkV=iBNy<%@)n-nZTJZAhcZ?xi3Lr>w%X@GJx zz9z=#P-rt{uKeH!{u=N_BgqyUP+EG=fK6pPBuXAhXHozk(?ZA3G*~EvJye?Z&-=W` pT3ZzdeSuJrz9>lVzj4$EWZ<~I53T83sATE(oer+{w`~JX{U`nj5GViu literal 0 HcmV?d00001 diff --git a/gfx/bootdlg/model_se30.png b/gfx/bootdlg/model_se30.png new file mode 100644 index 0000000000000000000000000000000000000000..5a9bb3e5aac42139aa7a859404d49e6e048a2206 GIT binary patch literal 2845 zcmds(dpMM78^G_GahNbn2b8n4ODj@XLqiiuq!J}*WlACG1zQ4Zby58$~-}gTK?)!e8=Y3DvZLuOr zC`bSR$$H~@djLGT#W@ni(4=bhO#*uGKWJfLchJoZKr8uZvgxL3yG1eG`8Jl?%7Nq~ zPwgJ%q+C{eopZd=b38)#+Vab(SQJ>n_L{3Lj9uHtOcg=T(M=bnd z;?pL*26uU|o;Vk;Q&_5}edKI#2E|Lky_J$!X6%x7nb4QyDXQZ~*bn+XTUtIl`JJP$XkvkZY zl}qzfy|%-2^kd7omj`W3w5;?ZZ}Y|GdZU4t`EsUWOV=>_H#<1UVAoyf?_N2U*{A(@ zdzp*4nJ&ho>iNk`-1v0M>({=yc~5}nyciT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M)ly1%mcWzfjebXaONNL6w@y5vdv-g5r z^SX@!Mba{7Z!cp=5uNUlrXP*Dy1T|isjF@+8@@GqRt$PBSNR&Aj~IE`C>0%3ccPwU zZZSqo$!-dr)nKHuxm35ZyAjGHpdF#ykvebZv@SnQo5XG67PuId56T7)g%=jZ?A8r< zTk9N^i-W}r@Mg+~Zfe-oJ1ytY*7uom(vz$++&c17Vh|Xc3D&oP zI>z1)*hw#Be6OAzg%*xMlZ=Ug+q~MW1M0nKfzQ#smt>e~G84*Fd!stC!lju;nz*UX#LO(WsXkQk zKZc*Q$9nvmXC~gf(?LZ;#)@Xg_V_-w{q!a@)QAQ#GTEJ+4dJ7%{1rNB3G(f0Z}yt7 zldeS>;qjh3X96Cs(ogbFi$9_6cz?@iy7XjWTytHFB58*2yLx;d@{*l_Mz!0EY|GuKwsB_ zD1DNQsqEZ$vkP$0^PW(wNnviK%p=q1yr`LBv)$3D)9d_t-_Dc8K9HrAU5l0RCzV;J zF7f$;&v0X_&i_mR}W5)&mjQ=O2v$JyLncFGV SF_cw;jI1rUtiNGS|M53~wc95E literal 0 HcmV?d00001 diff --git a/gfx/bootdlg/start.png b/gfx/bootdlg/start.png new file mode 100644 index 0000000000000000000000000000000000000000..ff3a9a03f3ebb5614d81003e43aefb33d3e460e2 GIT binary patch literal 3296 zcmcgvdo+~m8h__zTp|Xgj7xh+N!Zkma+!ASw!2bpO;;i+xyHG zYz-qyS7c)(%qTGtGvyk_oXzTaB!^ZuUS@42k+lB=_=tn_+m z0D!E$os~NPNO+0ZCn*8HG;Fm~;mw&7d-k}VIC2DlO_>py=8ny-N=e)j2kR}$;qqsm zyFM+r@VjQ3_eFhchjLQ4Hq*&_gMG8pWhJksrv*ICKjyd3uMSuCRYvbtu);54C|lh> zFr5ml`xHalnq%8z>*jok4yv!i&*7jGOtV~vmv_H!H=RzC*FtBoGoIjMH)Pot1}~Yp zYd_uNJ3Z#l`B_5xW-~<8_^MaUbTo6x8w?9+iftj>D^f~!Nj{P%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@}-R(zKP6_SVi; J6~B@a{sB(2E^7b) literal 0 HcmV?d00001 diff --git a/meson.build b/meson.build index afca2e3..6a4f9a0 100644 --- a/meson.build +++ b/meson.build @@ -38,7 +38,7 @@ conf = configuration_data({ # Enable about dialog 'NeedDoAboutMsg': 1, # Enable Control Mode (options menu) - 'UseControlKeys': 1, + 'UseControlKeys': 0, # Include international characters for Control Mode 'NeedIntlChars': 0, # Force keyboard to match Mac layout on Windows @@ -131,34 +131,22 @@ MAC_SRC = { } # User interface definitions -UI_SRC = { - 'WIN32': [ - 'src/UI/COMOSGLU.c', - 'src/UI/CONTROLM.c', - 'src/UI/WIN32/DBGLOG.c', - 'src/UI/WIN32/INTLKBRD.c', - 'src/UI/WIN32/KEYBOARD.c', - 'src/UI/WIN32/OSGLUWIN.c', - 'src/UI/WIN32/SOUND.c', - 'src/UI/WIN32/TIMEDATE.c', - 'rsrc/WIN32/main.rc', - ], - 'SDL2': [ - 'src/UI/COMOSGLU.c', - 'src/UI/CONTROLM.c', - 'src/UI/SDL2/OSGLUSD2.c', - #'src/UI/SDL2/CLIPBRD.c', - 'src/UI/SDL2/DBGLOG.c', - 'src/UI/SDL2/DRIVES.c', - 'src/UI/SDL2/INTL.c', - 'src/UI/SDL2/KEYBOARD.c', - 'src/UI/SDL2/MOUSE.c', - 'src/UI/SDL2/ROM.c', - 'src/UI/SDL2/SOUND.c', - 'src/UI/SDL2/TIMEDATE.c', - 'src/UI/SDL2/VIDEO.c', - ] -} +UI_SRC = [ + 'src/UI/COMOSGLU.c', + 'src/UI/CONTROLM.c', + 'src/UI/CONFIGM.c', + 'src/UI/SDL2/OSGLUSD2.c', + #'src/UI/SDL2/CLIPBRD.c', + 'src/UI/SDL2/DBGLOG.c', + 'src/UI/SDL2/DRIVES.c', + 'src/UI/SDL2/INTL.c', + 'src/UI/SDL2/KEYBOARD.c', + 'src/UI/SDL2/MOUSE.c', + 'src/UI/SDL2/ROM.c', + 'src/UI/SDL2/SOUND.c', + 'src/UI/SDL2/TIMEDATE.c', + 'src/UI/SDL2/VIDEO.c', +] EMU_SRC = [ 'src/PROGMAIN.c', @@ -177,7 +165,7 @@ EMU_INC = include_directories([ # Just gonna do an SDL2 Mac Plus for now executable( 'microvmac', - sources: MAC_SRC['Plus'] + UI_SRC['SDL2'] + EMU_SRC, + sources: MAC_SRC['Plus'] + UI_SRC + EMU_SRC, dependencies: [lSDL2], include_directories: EMU_INC, ) diff --git a/src/HW/SCREEN/SCRNMAPR.c b/src/HW/SCREEN/SCRNMAPR.c new file mode 100644 index 0000000..792c45a --- /dev/null +++ b/src/HW/SCREEN/SCRNMAPR.c @@ -0,0 +1,53 @@ +/* + HW/SCREEN/SCRNMAPR.h + + Copyright (C) 2012 Paul C. Pratt + + You can redistribute this file and/or modify it under the terms + of version 2 of the GNU General Public License as published by + the Free Software Foundation. You should have received a copy + of the license along with this file; see the file COPYING. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + license for more details. +*/ + +/* + SCReeN MAPpeR +*/ + +#include "SCRNMAPR.h" +#include + +void ScrnMapr_DoMap( + rect_t region, rect_t bounds, + const color_t *src, color_t *dst, + uint8_t src_depth, uint8_t dst_depth, + const color_t *map, uint8_t scale +) { + /* check of parameters */ + assert(src_depth >= 0); + assert(src_depth <= 3); + assert(dst_depth >= src_depth); + + /* define variables */ + int x, y, sx, sy; // loop vars + uint16_t line_width = bounds.right - bounds.left; + + for (y = region.top; y < region.bottom; y += 1) + { + for (sy = 0; sy < scale - 1; sy += 1) + { + for (x = region.left; x < region.right; x += 1) + { + color_t color = src[(y+sy)*line_width + x]; + for (sx = 0; sx < scale - 1; sx += 1) + { + dst[(y+sy)*line_width + x*scale + sx] = map[color]; + } + } + } + } +} diff --git a/src/HW/SCREEN/SCRNMAPR.h b/src/HW/SCREEN/SCRNMAPR.h index 282ed56..59316f2 100644 --- a/src/HW/SCREEN/SCRNMAPR.h +++ b/src/HW/SCREEN/SCRNMAPR.h @@ -1,168 +1,19 @@ -/* - HW/SCREEN/SCRNMAPR.h +/* SCRNMAPR.h */ +#include +#pragma once - Copyright (C) 2012 Paul C. Pratt +typedef struct { + uint16_t top; + uint16_t left; + uint16_t right; + uint16_t bottom; +} rect_t; - You can redistribute this file and/or modify it under the terms - of version 2 of the GNU General Public License as published by - the Free Software Foundation. You should have received a copy - of the license along with this file; see the file COPYING. +typedef uint32_t color_t; - This file is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - license for more details. -*/ - -/* - SCReeN MAPpeR -*/ - -/* required arguments for this template */ - -#ifndef ScrnMapr_DoMap /* procedure to be created by this template */ -#error "ScrnMapr_DoMap not defined" -#endif -#ifndef ScrnMapr_Src -#error "ScrnMapr_Src not defined" -#endif -#ifndef ScrnMapr_Dst -#error "ScrnMapr_Dst not defined" -#endif -#ifndef ScrnMapr_SrcDepth -#error "ScrnMapr_SrcDepth not defined" -#endif -#ifndef ScrnMapr_DstDepth -#error "ScrnMapr_DstDepth not defined" -#endif -#ifndef ScrnMapr_Map -#error "ScrnMapr_Map not defined" -#endif - -/* optional argument for this template */ - -#ifndef ScrnMapr_Scale -#define ScrnMapr_Scale 1 -#endif - -/* check of parameters */ - -#if (ScrnMapr_SrcDepth < 0) || (ScrnMapr_SrcDepth > 3) -#error "bad ScrnMapr_SrcDepth" -#endif - -#if (ScrnMapr_DstDepth < ScrnMapr_SrcDepth) -#error "bad ScrnMapr_Dst" -#endif - -/* calculate a few things local to this template */ - -#define ScrnMapr_MapElSz \ - (ScrnMapr_Scale << (ScrnMapr_DstDepth - ScrnMapr_SrcDepth)) - -#if 0 == (ScrnMapr_MapElSz & 3) -#define ScrnMapr_TranT uint32_t -#define ScrnMapr_TranLn2Sz 2 -#elif 0 == (ScrnMapr_MapElSz & 1) -#define ScrnMapr_TranT uint16_t -#define ScrnMapr_TranLn2Sz 1 -#else -#define ScrnMapr_TranT uint8_t -#define ScrnMapr_TranLn2Sz 0 -#endif - -#define ScrnMapr_TranN (ScrnMapr_MapElSz >> ScrnMapr_TranLn2Sz) - -#define ScrnMapr_ScrnWB (vMacScreenWidth >> (3 - ScrnMapr_SrcDepth)) - -/* now define the procedure */ - -LOCALPROC ScrnMapr_DoMap(int16_t top, int16_t left, - int16_t bottom, int16_t right) -{ - int i; - int j; -#if (ScrnMapr_TranN > 4) || (ScrnMapr_Scale > 2) - int k; -#endif - uint32_t t0; - ScrnMapr_TranT *pMap; -#if ScrnMapr_Scale > 1 - ScrnMapr_TranT *p3; -#endif - - uint16_t leftB = left >> (3 - ScrnMapr_SrcDepth); - uint16_t rightB = (right + (1 << (3 - ScrnMapr_SrcDepth)) - 1) - >> (3 - ScrnMapr_SrcDepth); - uint16_t jn = rightB - leftB; - uint16_t SrcSkip = ScrnMapr_ScrnWB - jn; - uint8_t *pSrc = ((uint8_t *)ScrnMapr_Src) - + leftB + ScrnMapr_ScrnWB * (uint32_t)top; - ScrnMapr_TranT *pDst = ((ScrnMapr_TranT *)ScrnMapr_Dst) - + ((leftB + ScrnMapr_ScrnWB * ScrnMapr_Scale * (uint32_t)top) - * ScrnMapr_TranN); - uint32_t DstSkip = SrcSkip * ScrnMapr_TranN; - - for (i = bottom - top; --i >= 0; ) { -#if ScrnMapr_Scale > 1 - p3 = pDst; -#endif - - for (j = jn; --j >= 0; ) { - t0 = *pSrc++; - pMap = - &((ScrnMapr_TranT *)ScrnMapr_Map)[t0 * ScrnMapr_TranN]; - -#if ScrnMapr_TranN > 4 - for (k = ScrnMapr_TranN; --k >= 0; ) { - *pDst++ = *pMap++; - } -#else - -#if ScrnMapr_TranN >= 2 - *pDst++ = *pMap++; -#endif -#if ScrnMapr_TranN >= 3 - *pDst++ = *pMap++; -#endif -#if ScrnMapr_TranN >= 4 - *pDst++ = *pMap++; -#endif - *pDst++ = *pMap; - -#endif /* ! ScrnMapr_TranN > 4 */ - - } - pSrc += SrcSkip; - pDst += DstSkip; - -#if ScrnMapr_Scale > 1 -#if ScrnMapr_Scale > 2 - for (k = ScrnMapr_Scale - 1; --k >= 0; ) -#endif - { - pMap = p3; - for (j = ScrnMapr_TranN * jn; --j >= 0; ) { - *pDst++ = *pMap++; - } - pDst += DstSkip; - } -#endif /* ScrnMapr_Scale > 1 */ - } -} - -/* undefine template locals and parameters */ - -#undef ScrnMapr_ScrnWB -#undef ScrnMapr_TranN -#undef ScrnMapr_TranLn2Sz -#undef ScrnMapr_TranT -#undef ScrnMapr_MapElSz - -#undef ScrnMapr_DoMap -#undef ScrnMapr_Src -#undef ScrnMapr_Dst -#undef ScrnMapr_SrcDepth -#undef ScrnMapr_DstDepth -#undef ScrnMapr_Map -#undef ScrnMapr_Scale +// Copy a rectangular bitmap region, scaling and converting color depth as needed +void ScrnMapr_DoMap( + rect_t bounds, + const uint8_t *src, uint8_t *dst, uint8_t src_depth, uint8_t dst_depth, + const uint8_t *map, uint8_t scale +); diff --git a/src/UI/CONFIGM.c b/src/UI/CONFIGM.c new file mode 100644 index 0000000..eb86726 --- /dev/null +++ b/src/UI/CONFIGM.c @@ -0,0 +1,22 @@ +/* + * CONFIG Mode + * + * A replacement for Control Mode, with prettier grapgics and actual settings + * + */ + +#include // everything else is deprecated now +#include +#include +#include "CONFIGM.h" +#include "UI/SDL2/OSGLUSD2.h" + +/* -- Public Functions -- */ + +void ConfigMode_Tick() +{ + // Get the screen context and just draw something there for now + + SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255); + SDL_RenderDrawRect(renderer, {.x = 16, .y = 16, .w = 128, .h = 128}); +} diff --git a/src/UI/CONFIGM.h b/src/UI/CONFIGM.h new file mode 100644 index 0000000..d5dbe1e --- /dev/null +++ b/src/UI/CONFIGM.h @@ -0,0 +1,11 @@ +/* + * CONFIG Mode + * + * A replacement for Control Mode, with prettier grapgics and actual settings + * + */ + +/* -- functions -- */ + +// Run this once every frame, I guess +void ConfigMode_Tick(); diff --git a/src/UI/WIN32/DBGLOG.c b/src/UI/_deprecated/WIN32/DBGLOG.c similarity index 100% rename from src/UI/WIN32/DBGLOG.c rename to src/UI/_deprecated/WIN32/DBGLOG.c diff --git a/src/UI/WIN32/INTLKBRD.c b/src/UI/_deprecated/WIN32/INTLKBRD.c similarity index 100% rename from src/UI/WIN32/INTLKBRD.c rename to src/UI/_deprecated/WIN32/INTLKBRD.c diff --git a/src/UI/WIN32/KEYBOARD.c b/src/UI/_deprecated/WIN32/KEYBOARD.c similarity index 100% rename from src/UI/WIN32/KEYBOARD.c rename to src/UI/_deprecated/WIN32/KEYBOARD.c diff --git a/src/UI/WIN32/OSGLUWIN.c b/src/UI/_deprecated/WIN32/OSGLUWIN.c similarity index 100% rename from src/UI/WIN32/OSGLUWIN.c rename to src/UI/_deprecated/WIN32/OSGLUWIN.c diff --git a/src/UI/WIN32/OSGLUWIN.h b/src/UI/_deprecated/WIN32/OSGLUWIN.h similarity index 100% rename from src/UI/WIN32/OSGLUWIN.h rename to src/UI/_deprecated/WIN32/OSGLUWIN.h diff --git a/src/UI/WIN32/SOUND.c b/src/UI/_deprecated/WIN32/SOUND.c similarity index 100% rename from src/UI/WIN32/SOUND.c rename to src/UI/_deprecated/WIN32/SOUND.c diff --git a/src/UI/WIN32/SOUND.h b/src/UI/_deprecated/WIN32/SOUND.h similarity index 100% rename from src/UI/WIN32/SOUND.h rename to src/UI/_deprecated/WIN32/SOUND.h diff --git a/src/UI/WIN32/TIMEDATE.c b/src/UI/_deprecated/WIN32/TIMEDATE.c similarity index 100% rename from src/UI/WIN32/TIMEDATE.c rename to src/UI/_deprecated/WIN32/TIMEDATE.c