Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

perifdll.c File Reference


Detailed Description

Handles events from misc periferies (at now keyboard only) and also contains random number generator

Definition in file perifdll.c.#include "../dllkit/dllkit.h"
#include "../usrmsgs.h"
#include <tchar.h>
#include <stdlib.h>

Go to the source code of this file.

Defines

#define KBSTAT   IOLO + 21
#define SHIFTSTAT   IOLO + 22
#define RANDOM   IOLO + 23
#define ADR(X, Y)   (((X) << 8) + (Y))
#define SHIFTFLAG   0x01
#define CTRLFLAG   0x02
#define IOSETGET(GVAR, SVAR)

Functions

BOOL APIENTRY DllMain (HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
DLLEXPORT void __cdecl InitDll (INITDLLSTRUCT *ids, INITDLLINFO *idi)
DLLEXPORT void __cdecl OnMessage (MESSAGEDLLSTRUCT *mds)
DLLEXPORT void __cdecl IOFunc (UINT adr, unsigned char *data, iomode mode)

Variables

unsigned char KbMap [256]
 Translation table.

volatile unsigned char Key = 0
volatile unsigned char KbState = 0
HANDLE hThisModule
MSGLIST Msgs
INITDLLSTRUCT info


Define Documentation

#define IOSETGET GVAR,
SVAR   
 

Value:

if (mode == IOREAD) {   \
                *data = GVAR;   \
        }       \
        else {  \
                SVAR = *data;   \
        }

Definition at line 150 of file perifdll.c.


Function Documentation

DLLEXPORT void __cdecl InitDll INITDLLSTRUCT   ids,
INITDLLINFO   idi
 

Todo:
free VideoMsgs

Definition at line 81 of file perifdll.c.


Variable Documentation

unsigned char KbMap[256]
 

Initial value:

 { 

        255, 255, 255, 255, 255, 255, 255,  30, 125, 255,       
        255, 255,   0, 255, 255, 255, 255, 255, 255,   1,       
        255, 255,   2,   3,       4,   5,  27, 255, 255, 255,   
        255,  32, 255, 255, 255, 255,  30,  28,  31,  29,       
        255, 255, 255, 255, 127, 126, 255,  48,  49,  50,       
         51,  52,  53,  54,  55,  56,  57, 255, 255, 255,       
        255, 255, 255, 255,  65,  66,  67,  68,  69,  70,       
         71,  72,  73,  74,  75,  76,  77,  78,  79,  80,       
         81,  82,  83,  84,  85,  86,  87,  88,  89,  90,       
        255, 255, 255, 255, 255,  48,  49,  50,  51,  52,       
         53,  54,  55,  56,  57,  42,  43, 255,  45, 255,       
         47, 255, 255, 255, 255, 255, 255, 255, 255, 255,       
        255, 255, 255, 255, 255, 255, 255, 255, 255, 255,       
        255, 255, 255, 255, 255, 255, 255, 255, 255, 255,       
        255, 255, 255, 124, 255, 255, 255, 255, 255, 255,       
        255, 255, 255, 255, 255, 255, 255, 255, 255, 255,       
        255, 255, 255, 255, 255, 255, 255, 255, 255, 255,       
        255, 255, 255, 255, 255, 255, 255, 255, 255, 255,       
        255, 255, 255, 255, 255,  59,  61,  44,  45,  46,       
         47, 255, 255, 255, 255, 255, 255, 255, 255, 255,       
        255, 255, 255, 255, 255, 255, 255, 255, 255, 255,       
        255, 255, 255, 255, 255, 255, 255, 255,  91,  92,       
         93,  39, 255, 255, 255, 255, 255, 255, 255, 255,       
        255, 255, 255, 255, 255, 255, 255, 255, 255, 255,       
        255, 255, 255, 255, 255, 255, 255
}
Translation table.

Translates Windows Virtual Keys to ATASCII codes doesn't handles all keys, to acces eg. small caps, you have to do it in the emulator's operating system (which isn't done by me :o)

Definition at line 25 of file perifdll.c.


Generated on Fri Sep 6 18:32:15 2002 for Emu6502 by doxygen1.2.17