Skip to content

A lightweight Macintosh 128K Emulator leveraging lib68k

License

hazzaclark/clarisse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clarisse

A lightweight Macintosh 128K Emulator leveraging lib68k

Motive:

The ambition behind this project is to leverage another means by which I can utilise my Motorola 68000 Emulation Library to create another emulator to laisse between. Created using pure C99, I aim to provide a lightweight means of communicating with my Emulation Library in conjunction with new additions for laissing with flat-memory regions for IO and Device Handlers.

Features:

Everything so far is a WIP. Although, majority of what is provided here aims to just be a modularisation of lib68k_mem's functionality, to handle Memory Management and subsequent Bus-related infrastructures.

This section will continue to expand as more is added.

Small O(1) Lookup Table:

Much like the contemporary of lib68k, I have opted to utilise a similar scheme for being able to define and initialise aspects within the lookup table. Due to the very little ISA of the VIA within the Macintosh 128K, the benefit is being able to declare a small lookup table as an extension of the struct declaration - otherwise mitigiating the need to declare a function pointer to delegate across all relevant source implementations.

This helps especially with initialising variables that would need to be initialised otherwise for startup

// ACCESS ENUM, CREATES TWO FUNCTION POINTERS TO ACCESS DATA
static const struct
{
    VIA_REGISTER_INDEX REGISTER;        // REGISTER TYPE
    U8(*READ)(void);                    // READ ARG
    void(*WRITE)(U8);                   // WRITE ARG            

} VIA_HANDLERS[] =
{
    {IRB, VIA_READ_IRB, NULL},
    {T1C_L, VIA_READ_T1C_L, NULL},
    {T1C_H, NULL, VIA_WRITE_T1C_H},
    {IFR, VIA_READ_IFR, NULL},
    {IER, NULL, VIA_WRITE_IER}
};

Building:

For building this project, you need a modern C Compiler and CMake which supports versions 3.20 onwards

From there, it is a case of:

git clone this repo

mkdir build && cd build

cmake ..

make

Sources:

Macintosh 128K Programmer Manual

Macintosh 128K Memory Layout

Macintosh 128K SCC

Macintosh 128K VIA

About

A lightweight Macintosh 128K Emulator leveraging lib68k

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published