dvxshell debugging. Starting to work!
This commit is contained in:
parent
0db50721d9
commit
76030270f9
35 changed files with 85 additions and 80 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# DV/X Shell Applications Makefile — builds DXE3 modules
|
||||
# DVX Shell Applications Makefile — builds DXE3 modules
|
||||
|
||||
DJGPP_PREFIX = $(HOME)/djgpp/djgpp
|
||||
DJGPP_LIBPATH = $(HOME)/claude/windriver/tools/lib
|
||||
|
|
@ -16,17 +16,17 @@ APPS = about notepad clock
|
|||
|
||||
all: $(APPS)
|
||||
|
||||
about: $(BINDIR)/about.dxe
|
||||
notepad: $(BINDIR)/notepad.dxe
|
||||
clock: $(BINDIR)/clock.dxe
|
||||
about: $(BINDIR)/about.app
|
||||
notepad: $(BINDIR)/notepad.app
|
||||
clock: $(BINDIR)/clock.app
|
||||
|
||||
$(BINDIR)/about.dxe: $(OBJDIR)/about.o | $(BINDIR)
|
||||
$(BINDIR)/about.app: $(OBJDIR)/about.o | $(BINDIR)
|
||||
$(DXE3GEN) -o $@ -E _appDescriptor -E _appMain -U $<
|
||||
|
||||
$(BINDIR)/notepad.dxe: $(OBJDIR)/notepad.o | $(BINDIR)
|
||||
$(BINDIR)/notepad.app: $(OBJDIR)/notepad.o | $(BINDIR)
|
||||
$(DXE3GEN) -o $@ -E _appDescriptor -E _appMain -U $<
|
||||
|
||||
$(BINDIR)/clock.dxe: $(OBJDIR)/clock.o | $(BINDIR)
|
||||
$(BINDIR)/clock.app: $(OBJDIR)/clock.o | $(BINDIR)
|
||||
$(DXE3GEN) -o $@ -E _appDescriptor -E _appMain -E _appShutdown -U $<
|
||||
|
||||
$(OBJDIR)/about.o: about/about.c | $(OBJDIR)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// about.c — "About DV/X Shell" sample DXE application (callback-only)
|
||||
// about.c — "About DVX Shell" sample DXE application (callback-only)
|
||||
//
|
||||
// Demonstrates a simple callback-only app: creates a window with widgets,
|
||||
// registers callbacks, and returns. The shell event loop handles the rest.
|
||||
|
|
@ -70,7 +70,7 @@ int32_t appMain(DxeAppContextT *ctx) {
|
|||
int32_t winX = (screenW - winW) / 2;
|
||||
int32_t winY = (screenH - winH) / 3;
|
||||
|
||||
sWin = dvxCreateWindow(ac, "About DV/X Shell", winX, winY, winW, winH, false);
|
||||
sWin = dvxCreateWindow(ac, "About DVX Shell", winX, winY, winW, winH, false);
|
||||
|
||||
if (!sWin) {
|
||||
return -1;
|
||||
|
|
@ -80,9 +80,9 @@ int32_t appMain(DxeAppContextT *ctx) {
|
|||
|
||||
WidgetT *root = wgtInitWindow(ac, sWin);
|
||||
|
||||
wgtLabel(root, "DV/X Shell 1.0");
|
||||
wgtLabel(root, "DVX Shell 1.0");
|
||||
wgtHSeparator(root);
|
||||
wgtLabel(root, "A DESQview/X-style desktop shell for DJGPP/DPMI.");
|
||||
wgtLabel(root, "A DOS Visual eXecutive desktop shell for DJGPP/DPMI.");
|
||||
wgtLabel(root, "Using DXE3 dynamic loading for application modules.");
|
||||
wgtSpacer(root);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# DV/X GUI Library Makefile for DJGPP cross-compilation
|
||||
# DVX GUI Library Makefile for DJGPP cross-compilation
|
||||
|
||||
DJGPP_PREFIX = $(HOME)/djgpp/djgpp
|
||||
CC = $(DJGPP_PREFIX)/bin/i586-pc-msdosdjgpp-gcc
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# DV/X GUI
|
||||
# DVX GUI
|
||||
|
||||
A DESQview/X-style windowed GUI compositor for DOS, targeting DJGPP/DPMI with
|
||||
A DOS Visual eXecutive windowed GUI compositor for DOS, targeting DJGPP/DPMI with
|
||||
VESA VBE 2.0+ linear framebuffer.
|
||||
|
||||
Motif-style beveled chrome, dirty-rectangle compositing, draggable and
|
||||
|
|
@ -63,7 +63,7 @@ The platform abstraction lives in `platform/`:
|
|||
| `platform/dvxPlatform.h` | OS/CPU-neutral interface: video, input, span ops, filename validation |
|
||||
| `platform/dvxPlatformDos.c` | DOS/DJGPP implementation: VESA, DPMI, INT 16h/33h, rep stosl/movsl |
|
||||
|
||||
To port DV/X to a new platform, implement a new `dvxPlatformXxx.c` against
|
||||
To port DVX to a new platform, implement a new `dvxPlatformXxx.c` against
|
||||
`platform/dvxPlatform.h` and swap it in the Makefile. No other files need
|
||||
modification.
|
||||
|
||||
|
|
@ -1546,7 +1546,7 @@ so only one icon redraws per interval. Double-click an icon to restore.
|
|||
|
||||
## Platform abstraction (`platform/dvxPlatform.h`)
|
||||
|
||||
All OS-specific code is behind a single interface. To port DV/X, implement
|
||||
All OS-specific code is behind a single interface. To port DVX, implement
|
||||
these functions in a new `dvxPlatformXxx.c`:
|
||||
|
||||
| Function | Purpose |
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvx_app.c — Layer 5: Application API for DV/X GUI
|
||||
// dvx_app.c — Layer 5: Application API for DVX GUI
|
||||
|
||||
#include "dvxApp.h"
|
||||
#include "dvxWidget.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvx_app.h — Layer 5: Application API for DV/X GUI
|
||||
// dvx_app.h — Layer 5: Application API for DVX GUI
|
||||
#ifndef DVX_APP_H
|
||||
#define DVX_APP_H
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvx_comp.c — Layer 3: Dirty rectangle compositor for DV/X GUI (optimized)
|
||||
// dvx_comp.c — Layer 3: Dirty rectangle compositor for DVX GUI (optimized)
|
||||
|
||||
#include "dvxComp.h"
|
||||
#include "platform/dvxPlatform.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvx_comp.h — Layer 3: Dirty rectangle compositor for DV/X GUI
|
||||
// dvx_comp.h — Layer 3: Dirty rectangle compositor for DVX GUI
|
||||
#ifndef DVX_COMP_H
|
||||
#define DVX_COMP_H
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvxCursor.h — Embedded mouse cursor bitmaps for DV/X GUI
|
||||
// dvxCursor.h — Embedded mouse cursor bitmaps for DVX GUI
|
||||
#ifndef DVX_CURSOR_H
|
||||
#define DVX_CURSOR_H
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvxDialog.c — Modal dialogs for DV/X GUI
|
||||
// dvxDialog.c — Modal dialogs for DVX GUI
|
||||
|
||||
#include "dvxDialog.h"
|
||||
#include "platform/dvxPlatform.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvxDialog.h — Modal dialogs for DV/X GUI
|
||||
// dvxDialog.h — Modal dialogs for DVX GUI
|
||||
#ifndef DVX_DIALOG_H
|
||||
#define DVX_DIALOG_H
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvx_draw.c — Layer 2: Drawing primitives for DV/X GUI (optimized)
|
||||
// dvx_draw.c — Layer 2: Drawing primitives for DVX GUI (optimized)
|
||||
|
||||
#include "dvxDraw.h"
|
||||
#include "platform/dvxPlatform.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvx_draw.h — Layer 2: Drawing primitives for DV/X GUI
|
||||
// dvx_draw.h — Layer 2: Drawing primitives for DVX GUI
|
||||
#ifndef DVX_DRAW_H
|
||||
#define DVX_DRAW_H
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvx_font.h — Embedded VGA bitmap font data (CP437) for DV/X GUI
|
||||
// dvx_font.h — Embedded VGA bitmap font data (CP437) for DVX GUI
|
||||
#ifndef DVX_FONT_H
|
||||
#define DVX_FONT_H
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvxIcon.c — stb_image implementation for DV/X GUI
|
||||
// dvxIcon.c — stb_image implementation for DVX GUI
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvxImageWrite.c — stb_image_write implementation for DV/X GUI
|
||||
// dvxImageWrite.c — stb_image_write implementation for DVX GUI
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvx_palette.h — 8-bit mode palette definition for DV/X GUI
|
||||
// dvx_palette.h — 8-bit mode palette definition for DVX GUI
|
||||
#ifndef DVX_PALETTE_H
|
||||
#define DVX_PALETTE_H
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvx_types.h — Shared type definitions for DV/X GUI
|
||||
// dvx_types.h — Shared type definitions for DVX GUI
|
||||
#ifndef DVX_TYPES_H
|
||||
#define DVX_TYPES_H
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvx_video.c — Layer 1: Video backend for DV/X GUI
|
||||
// dvx_video.c — Layer 1: Video backend for DVX GUI
|
||||
//
|
||||
// Platform-independent video utilities. The actual VESA/VBE code
|
||||
// now lives in dvxPlatformDos.c (or the platform file for whatever
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvx_video.h — Layer 1: VESA VBE video backend for DV/X GUI
|
||||
// dvx_video.h — Layer 1: VESA VBE video backend for DVX GUI
|
||||
#ifndef DVX_VIDEO_H
|
||||
#define DVX_VIDEO_H
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvxWidget.h — Widget system for DV/X GUI
|
||||
// dvxWidget.h — Widget system for DVX GUI
|
||||
#ifndef DVX_WIDGET_H
|
||||
#define DVX_WIDGET_H
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvx_wm.c — Layer 4: Window manager for DV/X GUI
|
||||
// dvx_wm.c — Layer 4: Window manager for DVX GUI
|
||||
|
||||
#include "dvxWm.h"
|
||||
#include "dvxVideo.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvx_wm.h — Layer 4: Window manager for DV/X GUI
|
||||
// dvx_wm.h — Layer 4: Window manager for DVX GUI
|
||||
#ifndef DVX_WM_H
|
||||
#define DVX_WM_H
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// dvxPlatform.h — Platform abstraction layer for DV/X GUI
|
||||
// dvxPlatform.h — Platform abstraction layer for DVX GUI
|
||||
//
|
||||
// All OS-specific and CPU-specific code is isolated behind this
|
||||
// interface. To port DV/X to a new platform, implement a new
|
||||
// interface. To port DVX to a new platform, implement a new
|
||||
// dvxPlatformXxx.c against this header.
|
||||
#ifndef DVX_PLATFORM_H
|
||||
#define DVX_PLATFORM_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dvxPlatformDos.c — DOS/DJGPP platform implementation for DV/X GUI
|
||||
// dvxPlatformDos.c — DOS/DJGPP platform implementation for DVX GUI
|
||||
//
|
||||
// All BIOS calls, DPMI functions, port I/O, inline assembly, and
|
||||
// DOS-specific file handling are isolated in this single file.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# DV/X GUI Demo Makefile for DJGPP cross-compilation
|
||||
# DVX GUI Demo Makefile for DJGPP cross-compilation
|
||||
|
||||
DJGPP_PREFIX = $(HOME)/djgpp/djgpp
|
||||
CC = $(DJGPP_PREFIX)/bin/i586-pc-msdosdjgpp-gcc
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// demo.c — DV/X GUI demonstration application
|
||||
// demo.c — DVX GUI demonstration application
|
||||
|
||||
#include "dvxApp.h"
|
||||
#include "dvxDialog.h"
|
||||
|
|
@ -234,9 +234,9 @@ static void onMenuCb(WindowT *win, int32_t menuId) {
|
|||
break;
|
||||
|
||||
case CMD_HELP_ABOUT:
|
||||
dvxMessageBox(sCtx, "About DV/X Demo",
|
||||
"DV/X GUI Demonstration\n\n"
|
||||
"A DESQview/X-style windowing system for DOS.",
|
||||
dvxMessageBox(sCtx, "About DVX Demo",
|
||||
"DVX GUI Demonstration\n\n"
|
||||
"A DOS Visual eXecutive windowing system for DOS.",
|
||||
MB_OK | MB_ICONINFO);
|
||||
break;
|
||||
|
||||
|
|
@ -376,9 +376,9 @@ static void onPaintText(WindowT *win, RectT *dirtyArea) {
|
|||
}
|
||||
|
||||
static const char *lines[] = {
|
||||
"DV/X GUI Compositor",
|
||||
"DVX GUI Compositor",
|
||||
"",
|
||||
"A DESQview/X-style windowed GUI",
|
||||
"A DOS Visual eXecutive windowed GUI",
|
||||
"compositor for DOS, targeting",
|
||||
"DJGPP/DPMI.",
|
||||
"",
|
||||
|
|
@ -670,7 +670,7 @@ static void setupControlsWindow(AppContextT *ctx) {
|
|||
wgtImage(imgRow, logoData, imgW, imgH, imgPitch);
|
||||
}
|
||||
wgtVSeparator(imgRow);
|
||||
wgtLabel(imgRow, "32x32 DV/X logo");
|
||||
wgtLabel(imgRow, "32x32 DVX logo");
|
||||
|
||||
// --- Tab 7: Editor (TextArea, Canvas) ---
|
||||
WidgetT *page7e = wgtTabPage(tabs, "&Editor");
|
||||
|
|
@ -835,7 +835,7 @@ static void setupControlsWindow(AppContextT *ctx) {
|
|||
|
||||
static void setupMainWindow(AppContextT *ctx) {
|
||||
// Window 1: Text information window with menu bar
|
||||
WindowT *win1 = dvxCreateWindow(ctx, "DV/X Information", 50, 40, 340, 350, true);
|
||||
WindowT *win1 = dvxCreateWindow(ctx, "DVX Information", 50, 40, 340, 350, true);
|
||||
|
||||
if (win1) {
|
||||
win1->userData = ctx;
|
||||
|
|
@ -987,7 +987,7 @@ static void setupTerminalWindow(AppContextT *ctx) {
|
|||
static const uint8_t ansiDemo[] =
|
||||
"\x1B[2J" // clear screen
|
||||
"\x1B[1;34m========================================\r\n"
|
||||
" DV/X ANSI Terminal Emulator\r\n"
|
||||
" DVX ANSI Terminal Emulator\r\n"
|
||||
"========================================\x1B[0m\r\n"
|
||||
"\r\n"
|
||||
"\x1B[1mBold text\x1B[0m, "
|
||||
|
|
@ -1159,11 +1159,11 @@ int main(int argc, char **argv) {
|
|||
|
||||
AppContextT ctx;
|
||||
|
||||
printf("DV/X GUI Demo\n");
|
||||
printf("DVX GUI Demo\n");
|
||||
printf("Initializing VESA video...\n");
|
||||
|
||||
if (dvxInit(&ctx, 1024, 768, 16) != 0) {
|
||||
fprintf(stderr, "Failed to initialize DV/X GUI\n");
|
||||
fprintf(stderr, "Failed to initialize DVX GUI\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
@ -1178,7 +1178,7 @@ int main(int argc, char **argv) {
|
|||
|
||||
dvxShutdown(&ctx);
|
||||
|
||||
printf("DV/X GUI Demo ended.\n");
|
||||
printf("DVX GUI Demo ended.\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# DV/X Shell Makefile for DJGPP cross-compilation
|
||||
# DVX Shell Makefile for DJGPP cross-compilation
|
||||
|
||||
DJGPP_PREFIX = $(HOME)/djgpp/djgpp
|
||||
DJGPP_LIBPATH = $(HOME)/claude/windriver/tools/lib
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// shellApp.c — DV/X Shell application loading, lifecycle, and reaping
|
||||
// shellApp.c — DVX Shell application loading, lifecycle, and reaping
|
||||
//
|
||||
// Manages DXE app loading via dlopen/dlsym, resource tracking through
|
||||
// sCurrentAppId, and clean teardown of both callback-only and main-loop apps.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// shellApp.h — DV/X Shell application lifecycle types and API
|
||||
// shellApp.h — DVX Shell application lifecycle types and API
|
||||
#ifndef SHELL_APP_H
|
||||
#define SHELL_APP_H
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// shellDesktop.c — Program Manager window for DV/X Shell
|
||||
// shellDesktop.c — Program Manager window for DVX Shell
|
||||
//
|
||||
// Displays a grid of available DXE apps from the apps/ directory.
|
||||
// Double-click or Enter launches an app. Includes Task Manager (Ctrl+Esc).
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
// ============================================================
|
||||
|
||||
typedef struct {
|
||||
char name[SHELL_APP_NAME_MAX]; // display name (filename without .dxe)
|
||||
char name[SHELL_APP_NAME_MAX]; // display name (filename without .app)
|
||||
char path[MAX_PATH_LEN]; // full path
|
||||
} DxeEntryT;
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ static void buildPmWindow(void) {
|
|||
wmAddMenuItem(windowMenu, "Tile &Vertically", CMD_TILE_V);
|
||||
|
||||
MenuT *helpMenu = wmAddMenu(menuBar, "&Help");
|
||||
wmAddMenuItem(helpMenu, "&About DV/X Shell...", CMD_ABOUT);
|
||||
wmAddMenuItem(helpMenu, "&About DVX Shell...", CMD_ABOUT);
|
||||
wmAddMenuSeparator(helpMenu);
|
||||
wmAddMenuItem(helpMenu, "&Task Manager\tCtrl+Esc", CMD_TASK_MGR);
|
||||
|
||||
|
|
@ -143,6 +143,7 @@ static void buildPmWindow(void) {
|
|||
// Status bar
|
||||
WidgetT *statusBar = wgtStatusBar(root);
|
||||
sStatusLabel = wgtLabel(statusBar, "");
|
||||
sStatusLabel->weight = 100;
|
||||
updateStatusText();
|
||||
|
||||
dvxFitWindow(sCtx, sPmWindow);
|
||||
|
|
@ -220,7 +221,7 @@ static void onAppButtonClick(WidgetT *w) {
|
|||
static void onPmClose(WindowT *win) {
|
||||
(void)win;
|
||||
// Confirm exit
|
||||
int32_t result = dvxMessageBox(sCtx, "Exit Shell", "Are you sure you want to exit DV/X Shell?", MB_YESNO | MB_ICONQUESTION);
|
||||
int32_t result = dvxMessageBox(sCtx, "Exit Shell", "Are you sure you want to exit DVX Shell?", MB_YESNO | MB_ICONQUESTION);
|
||||
|
||||
if (result == ID_YES) {
|
||||
sCtx->running = false;
|
||||
|
|
@ -235,7 +236,7 @@ static void onPmMenu(WindowT *win, int32_t menuId) {
|
|||
case CMD_RUN:
|
||||
{
|
||||
FileFilterT filters[] = {
|
||||
{ "DXE Applications (*.dxe)", "*.dxe" },
|
||||
{ "Applications (*.app)", "*.app" },
|
||||
{ "All Files (*.*)", "*.*" }
|
||||
};
|
||||
char path[MAX_PATH_LEN];
|
||||
|
|
@ -406,10 +407,10 @@ static void scanAppsDir(void) {
|
|||
continue;
|
||||
}
|
||||
|
||||
// Check for .dxe extension (case-insensitive)
|
||||
// Check for .app extension (case-insensitive)
|
||||
const char *ext = ent->d_name + len - 4;
|
||||
|
||||
if (strcmp(ext, ".dxe") != 0 && strcmp(ext, ".DXE") != 0) {
|
||||
if (strcmp(ext, ".app") != 0 && strcmp(ext, ".APP") != 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -435,13 +436,13 @@ static void scanAppsDir(void) {
|
|||
}
|
||||
|
||||
closedir(dir);
|
||||
shellLog("Shell: found %ld DXE app(s)", (long)sDxeCount);
|
||||
shellLog("Shell: found %ld app(s)", (long)sDxeCount);
|
||||
}
|
||||
|
||||
|
||||
static void showAboutDialog(void) {
|
||||
dvxMessageBox(sCtx, "About DV/X Shell",
|
||||
"DV/X Shell 1.0\n\nA DESQview/X-style desktop shell for DJGPP/DPMI. Using DXE3 dynamic loading for application modules.",
|
||||
dvxMessageBox(sCtx, "About DVX Shell",
|
||||
"DVX Shell 1.0\n\nA DOS Visual eXecutive desktop shell for DJGPP/DPMI. Using DXE3 dynamic loading for application modules.",
|
||||
MB_OK | MB_ICONINFO);
|
||||
}
|
||||
|
||||
|
|
@ -463,7 +464,7 @@ static void updateStatusText(void) {
|
|||
}
|
||||
|
||||
wgtSetText(sStatusLabel, buf);
|
||||
wgtInvalidatePaint(sStatusLabel);
|
||||
wgtInvalidate(sStatusLabel);
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// shellExport.c — DXE export table and wrapper functions for DV/X Shell
|
||||
// shellExport.c — DXE export table and wrapper functions for DVX Shell
|
||||
//
|
||||
// Exports all dvx*/wgt*/ts* symbols that DXE apps need. A few functions
|
||||
// are wrapped for resource tracking (window ownership via appId).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// shellMain.c — DV/X Shell entry point and main loop
|
||||
// shellMain.c — DVX Shell entry point and main loop
|
||||
//
|
||||
// Initializes the GUI, task system, DXE export table, and Program Manager.
|
||||
// Runs the cooperative main loop, yielding to app tasks and reaping
|
||||
|
|
@ -142,13 +142,13 @@ void shellLog(const char *fmt, ...) {
|
|||
|
||||
int main(void) {
|
||||
sLogFile = fopen("shell.log", "w");
|
||||
shellLog("DV/X Shell starting...");
|
||||
shellLog("DVX Shell starting...");
|
||||
|
||||
// Initialize GUI
|
||||
int32_t result = dvxInit(&sCtx, 640, 480, 32);
|
||||
|
||||
if (result != 0) {
|
||||
shellLog("Failed to initialize DV/X GUI (error %ld)", (long)result);
|
||||
shellLog("Failed to initialize DVX GUI (error %ld)", (long)result);
|
||||
|
||||
if (sLogFile) {
|
||||
fclose(sLogFile);
|
||||
|
|
@ -188,7 +188,7 @@ int main(void) {
|
|||
// Install crash handler after everything is initialized
|
||||
installCrashHandler();
|
||||
|
||||
shellLog("DV/X Shell ready.");
|
||||
shellLog("DVX Shell ready.");
|
||||
|
||||
// Set recovery point for crash handler
|
||||
if (setjmp(sCrashJmp) != 0) {
|
||||
|
|
@ -203,7 +203,11 @@ int main(void) {
|
|||
ShellAppT *app = shellGetApp(sCurrentAppId);
|
||||
|
||||
if (app) {
|
||||
char msg[256];
|
||||
snprintf(msg, sizeof(msg), "'%s' has caused a fault and will be terminated.", app->name);
|
||||
shellForceKillApp(&sCtx, app);
|
||||
sCurrentAppId = 0;
|
||||
dvxMessageBox(&sCtx, "Application Error", msg, MB_OK | MB_ICONERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -228,7 +232,7 @@ int main(void) {
|
|||
shellDesktopUpdateStatus();
|
||||
}
|
||||
|
||||
shellLog("DV/X Shell shutting down...");
|
||||
shellLog("DVX Shell shutting down...");
|
||||
|
||||
// Clean shutdown: terminate all apps
|
||||
shellTerminateAllApps(&sCtx);
|
||||
|
|
@ -236,7 +240,7 @@ int main(void) {
|
|||
tsShutdown();
|
||||
dvxShutdown(&sCtx);
|
||||
|
||||
shellLog("DV/X Shell exited.");
|
||||
shellLog("DVX Shell exited.");
|
||||
|
||||
if (sLogFile) {
|
||||
fclose(sLogFile);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# SecLink Terminal Demo
|
||||
|
||||
DOS terminal emulator combining the DV/X windowed GUI with SecLink
|
||||
DOS terminal emulator combining the DVX windowed GUI with SecLink
|
||||
encrypted serial communication. Connects to a remote BBS through the
|
||||
SecLink proxy, providing a full ANSI terminal in a DESQview/X-style
|
||||
SecLink proxy, providing a full ANSI terminal in a DVX-style
|
||||
window with encrypted transport.
|
||||
|
||||
## Architecture
|
||||
|
|
@ -10,7 +10,7 @@ window with encrypted transport.
|
|||
```
|
||||
termdemo (DOS, 86Box)
|
||||
|
|
||||
+--- DV/X GUI windowed desktop, ANSI terminal widget
|
||||
+--- DVX GUI windowed desktop, ANSI terminal widget
|
||||
|
|
||||
+--- SecLink encrypted serial link
|
||||
| |
|
||||
|
|
@ -56,7 +56,7 @@ termdemo -h # show usage
|
|||
1. Seed the RNG from hardware entropy
|
||||
2. Open SecLink on the specified COM port (8N1, no handshake)
|
||||
3. Perform DH key exchange (blocks until the proxy completes its side)
|
||||
4. Initialize the DV/X GUI (1024x768, 16bpp VESA)
|
||||
4. Initialize the DVX GUI (1024x768, 16bpp VESA)
|
||||
5. Create a resizable terminal window with menu bar and status bar
|
||||
6. Enter the main loop
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ All libraries are in `../lib/`:
|
|||
|
||||
| Library | Purpose |
|
||||
|------------------|--------------------------------------|
|
||||
| `libdvx.a` | DV/X windowed GUI and widget system |
|
||||
| `libdvx.a` | DVX windowed GUI and widget system |
|
||||
| `libseclink.a` | Secure serial link wrapper |
|
||||
| `libpacket.a` | HDLC framing and reliability |
|
||||
| `libsecurity.a` | DH key exchange and XTEA cipher |
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// termdemo.c — SecLink terminal emulator demo
|
||||
//
|
||||
// Uses DV/X GUI ANSI terminal widget with SecLink encrypted serial link
|
||||
// Uses DVX GUI ANSI terminal widget with SecLink encrypted serial link
|
||||
// to provide a BBS terminal over a secured serial connection.
|
||||
//
|
||||
// Usage: termdemo [com_port] [baud_rate]
|
||||
|
|
@ -209,13 +209,13 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
printf("Secure link established.\n\n");
|
||||
|
||||
// Initialize DV/X GUI
|
||||
// Initialize DVX GUI
|
||||
AppContextT ctx;
|
||||
|
||||
printf("Initializing video...\n");
|
||||
|
||||
if (dvxInit(&ctx, 1024, 768, 16) != 0) {
|
||||
fprintf(stderr, "Failed to initialize DV/X GUI\n");
|
||||
fprintf(stderr, "Failed to initialize DVX GUI\n");
|
||||
secLinkClose(tc.link);
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue