Main framework of the emu6502 applictaion, contains window and plugin management.
Definition in file emu6502.c.#include <windows.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <commdlg.h>
#include <commctrl.h>
#include <stdio.h>
#include "emu6502.h"
Go to the source code of this file.
Defines | |
#define | WIN32_LEAN_AND_MEAN |
#define | MAX_LOADSTRING 512 |
#define | CR 13 |
#define | LF 10 |
Functions | |
int APIENTRY | WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) |
Entry point of this app. | |
ATOM | MyRegisterClass (HINSTANCE hInstance) |
Registers the main window class. | |
BOOL | InitInstance (HINSTANCE hInstance, int nCmdShow) |
Inits & shows the main window. | |
HWND | CreateToolBar (HWND hParentWnd) |
Creates the main toolbar. | |
LRESULT CALLBACK | WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) |
Main message handling routine. | |
LRESULT CALLBACK | About (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) |
About dialog's DialogProc. | |
BOOL | LoadMemFile (HWND hWnd) |
Loads memory image. | |
void | error (HWND hWnd, UINT uID, TCHAR *name) |
Error reporting proc. | |
BOOL | ForwardDllMessage (UINT message, WPARAM wParam, LPARAM lParam, DllMsgList *actlist) |
Forwards message to registered plugin OnMessage functions. | |
void | LoadPlugins (DllMsgList **list, PtrList **InstList) |
Loads plugins named in plugins.txt. | |
BOOL | LoadPlugin (TCHAR *name, DllMsgList **list, PtrList **InstList) |
Loads plugin of given name. | |
void | AddDllMsg (DllMsgList **list, UINT message, pForwardDllMsgProc FDMProc) |
Adds message catching dll function to a dll message list. | |
void | UnloadPlugins (PtrList *list) |
void | AddToPtrList (void *ptr, PtrList **list) |
Allocates and adds new member to existing or NULL list. | |
TCHAR * | GetNextStrToken (TCHAR **buf) |
Helper function for LoadPlugins. | |
Variables | |
HINSTANCE | hInst |
Handle to instance of this app. | |
HWND | hMainWnd |
Handle to the main window. | |
HWND | hToolBar |
Handle to the toolbar. | |
DllMsgList * | DMList = NULL |
List of messages and theirs catching dll functions. | |
PtrList * | DHInstList = NULL |
List of dll handles. | |
TCHAR | szTitle [MAX_LOADSTRING] |
TCHAR | szWindowClass [MAX_LOADSTRING] |
|
About dialog's DialogProc.
|
|
Adds message catching dll function to a dll message list.
|
|
Allocates and adds new member to existing or NULL list.
|
|
Creates the main toolbar.
Creates main toolbar and adds one Open button to it
|
|
Error reporting proc.
Shows a messagebox with given error mesage (from resources). This message can also contain s in this case the parameter name becomes effective and prints on the position of s.
|
|
Forwards message to registered plugin OnMessage functions.
|
|
Helper function for LoadPlugins.
Sideeffect - makes buf to point to the next item
|
|
Inits & shows the main window.
Creates the main window, sizes it to fit the 256x256 canvas, creates toolbar by calling @CreateToolbar, and then loads plugins by calling LoadPlugins.
|
|
Loads memory image.
Stops execution of the CPU, loads memory image, also controls it's length |
|
Loads plugin of given name.
Executes his InitDll functions, receives list of messages to be catched in this plugin and attaches it to the DllMsgList list.
|
|
Loads plugins named in plugins.txt.
Goes through the plugins.txt file and loads named plugins by calling LoadPlugin procedure.
|
|
Registers the main window class.
|
|
Entry point of this app.
|
|
Main message handling routine.
|
|
List of dll handles.
|
|
List of messages and theirs catching dll functions.
|
|
Handle to instance of this app.
|
|
Handle to the main window.
|
|
Handle to the toolbar.
|