kopia lustrzana https://github.com/Jean-MarcHarvengt/MCUME
started populating files
rodzic
2f2595d7ea
commit
435475c231
File diff suppressed because one or more lines are too long
|
@ -1058,7 +1058,7 @@
|
|||
{
|
||||
"directoryIndex" : 0,
|
||||
"id" : "ELF2UF2Build::@6890427a1f51a3e7e1df",
|
||||
"jsonFile" : "target-ELF2UF2Build-Debug-d29ebadad58281dccf46.json",
|
||||
"jsonFile" : "target-ELF2UF2Build-Debug-e3b5e6517c7e9be2a863.json",
|
||||
"name" : "ELF2UF2Build",
|
||||
"projectIndex" : 0
|
||||
},
|
||||
|
@ -1107,14 +1107,14 @@
|
|||
{
|
||||
"directoryIndex" : 0,
|
||||
"id" : "mcume::@6890427a1f51a3e7e1df",
|
||||
"jsonFile" : "target-mcume-Debug-40363cdc2bc8a007d553.json",
|
||||
"jsonFile" : "target-mcume-Debug-4749c89eddb72e6c3f67.json",
|
||||
"name" : "mcume",
|
||||
"projectIndex" : 0
|
||||
},
|
||||
{
|
||||
"directoryIndex" : 0,
|
||||
"id" : "mcume_picovga_pio_h::@6890427a1f51a3e7e1df",
|
||||
"jsonFile" : "target-mcume_picovga_pio_h-Debug-a95a4c735bfbd7751e05.json",
|
||||
"jsonFile" : "target-mcume_picovga_pio_h-Debug-54af119ea9bc7f551199.json",
|
||||
"name" : "mcume_picovga_pio_h",
|
||||
"projectIndex" : 0
|
||||
}
|
|
@ -26,7 +26,7 @@
|
|||
"objects" :
|
||||
[
|
||||
{
|
||||
"jsonFile" : "codemodel-v2-aa551a2eb962bc9b9292.json",
|
||||
"jsonFile" : "codemodel-v2-a675de8e4d22beaf6ad9.json",
|
||||
"kind" : "codemodel",
|
||||
"version" :
|
||||
{
|
||||
|
@ -35,7 +35,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"jsonFile" : "cache-v2-86c75b67da2eaca6c278.json",
|
||||
"jsonFile" : "cache-v2-d8346c595746696825d6.json",
|
||||
"kind" : "cache",
|
||||
"version" :
|
||||
{
|
||||
|
@ -90,7 +90,7 @@
|
|||
"responses" :
|
||||
[
|
||||
{
|
||||
"jsonFile" : "cache-v2-86c75b67da2eaca6c278.json",
|
||||
"jsonFile" : "cache-v2-d8346c595746696825d6.json",
|
||||
"kind" : "cache",
|
||||
"version" :
|
||||
{
|
||||
|
@ -99,7 +99,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"jsonFile" : "codemodel-v2-aa551a2eb962bc9b9292.json",
|
||||
"jsonFile" : "codemodel-v2-a675de8e4d22beaf6ad9.json",
|
||||
"kind" : "codemodel",
|
||||
"version" :
|
||||
{
|
|
@ -26,7 +26,7 @@
|
|||
{
|
||||
"command" : 4,
|
||||
"file" : 4,
|
||||
"line" : 373,
|
||||
"line" : 371,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
|
@ -40,13 +40,13 @@
|
|||
{
|
||||
"command" : 0,
|
||||
"file" : 0,
|
||||
"line" : 318,
|
||||
"line" : 319,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"command" : 1,
|
||||
"file" : 0,
|
||||
"line" : 352,
|
||||
"line" : 350,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
|
@ -67,7 +67,7 @@
|
|||
{
|
||||
"command" : 4,
|
||||
"file" : 0,
|
||||
"line" : 349,
|
||||
"line" : 347,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
|
@ -79,7 +79,7 @@
|
|||
{
|
||||
"command" : 7,
|
||||
"file" : 0,
|
||||
"line" : 373,
|
||||
"line" : 371,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
|
@ -113,19 +113,19 @@
|
|||
{
|
||||
"command" : 8,
|
||||
"file" : 0,
|
||||
"line" : 362,
|
||||
"line" : 360,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"command" : 9,
|
||||
"file" : 0,
|
||||
"line" : 367,
|
||||
"line" : 365,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"command" : 10,
|
||||
"file" : 0,
|
||||
"line" : 316,
|
||||
"line" : 317,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
|
@ -24,7 +24,7 @@
|
|||
{
|
||||
"command" : 1,
|
||||
"file" : 1,
|
||||
"line" : 349,
|
||||
"line" : 347,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
File diff suppressed because one or more lines are too long
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Plik diff jest za duży
Load Diff
Plik binarny nie jest wyświetlany.
Plik diff jest za duży
Load Diff
Plik diff jest za duży
Load Diff
Plik binarny nie jest wyświetlany.
|
@ -0,0 +1,35 @@
|
|||
#include "processor/Z80.h"
|
||||
#include "roms/rom464.h"
|
||||
#include "emuapi.h"
|
||||
|
||||
struct { unsigned char R,G,B;} Palette[27] = {
|
||||
{ 0, 0, 0}, // Black
|
||||
{ 0, 0, 128}, // Blue
|
||||
{ 0, 0, 255}, // Bright blue
|
||||
{ 128, 0, 0}, // Red
|
||||
{ 128, 0, 128}, // Magenta
|
||||
{ 128, 0, 255}, // Mauve
|
||||
{ 255, 0, 0}, // Bright Red
|
||||
{ 255, 0, 128}, // Purple
|
||||
{ 255, 0, 255}, // Bright Magenta
|
||||
{ 0, 128, 0}, // Green
|
||||
{ 0, 128, 128}, // Cyan
|
||||
{ 0, 128, 255}, // Sky Blue
|
||||
{ 128, 128, 0}, // Yellow
|
||||
{ 128, 128, 128}, // White
|
||||
{ 128, 128, 255}, // Pastel Blue
|
||||
{ 255, 128, 0}, // Orange
|
||||
{ 255, 128, 128}, // Pink
|
||||
{ 255, 128, 255}, // Pastel Magenta
|
||||
{ 0, 255, 0}, // Bright Green
|
||||
{ 0, 255, 128}, // Sea Green
|
||||
{ 0, 255, 255}, // Bright Cyan
|
||||
{ 128, 255, 0}, // Lime
|
||||
{ 128, 255, 128}, // Pastel Green
|
||||
{ 128, 255, 255}, // Pastel Cyan
|
||||
{ 255, 255, 0}, // Bright Yellow
|
||||
{ 255, 255, 128}, // Pastel Yellow
|
||||
{ 255, 255, 255}, // Bright White
|
||||
};
|
||||
|
||||
// TODO add cpu instance etc.
|
|
@ -0,0 +1,89 @@
|
|||
#ifndef EMUAPI_H
|
||||
#define EMUAPI_H
|
||||
|
||||
#include "platform_config.h"
|
||||
|
||||
/* Title */
|
||||
#define TITLE " Amstrad CPC Emulator"
|
||||
#define ROMSDIR "cpc"
|
||||
|
||||
#define emu_Init(ROM) {cpc_Init(); cpc_Start();}
|
||||
#define emu_Step(x) {cpc_Step();}
|
||||
#define emu_Input(x) {cpc_Input(x);}
|
||||
|
||||
#define PALETTE_SIZE 27
|
||||
#define VID_FRAME_SKIP 0x0
|
||||
#define TFT_VUBFFER_YCROP 0
|
||||
|
||||
#define ACTION_NONE 0
|
||||
#define ACTION_MAXKBDVAL 225
|
||||
#define ACTION_EXITKBD 128
|
||||
#define ACTION_RUNTFT 129
|
||||
#define ACTION_RUNVGA 130
|
||||
|
||||
#ifdef KEYMAP_PRESENT
|
||||
// TODO add key mappings
|
||||
#endif
|
||||
|
||||
// here are joystick mask mappings in emuapi.h for picospeccy
|
||||
|
||||
extern void emu_init(void);
|
||||
extern void emu_start(void);
|
||||
extern void emu_resetSD(void);
|
||||
|
||||
extern void emu_printf(const char* text);
|
||||
extern void emu_printi(int val);
|
||||
extern void* emu_Malloc(int size);
|
||||
extern void emu_Free(void* pt);
|
||||
|
||||
extern int emu_FileOpen(const char* filepath, const char* mode);
|
||||
extern int emu_FileRead(void* buf, int size, int handler);
|
||||
extern int emu_FileGetc(int handler);
|
||||
extern int emu_FileSeek(int handler, int seek, int origin);
|
||||
extern int emu_FileTell(int handler);
|
||||
extern void emu_FileClose(int handler);
|
||||
|
||||
extern unsigned int emu_FileSize(const char* filepath);
|
||||
extern unsigned int emu_LoadFile(const char* filepath, void* buf, int size);
|
||||
|
||||
extern void emu_SetPaletteEntry(unsigned char r, unsigned char g, unsigned char b, int index);
|
||||
extern void emu_DrawScreen(unsigned char* VBuf, int width, int height, int stride);
|
||||
extern void emu_DrawLine(unsigned char* VBuf, int width, int height, int line);
|
||||
extern void emu_DrawLine8(unsigned char* VBuf, int width, int height, int line);
|
||||
extern void emu_DrawLine16(unsigned char* Vbuf, int width, int height, int line);
|
||||
extern void emu_DrawVsync(void);
|
||||
extern int emu_FrameSkip(void);
|
||||
extern void* emu_LineBuffer(int line);
|
||||
#define RGBVAL32(r,g,b) ( (r<<16) | (g<<8) | b)
|
||||
#define RGBVAL16(r,g,b) ( (((r>>3)&0x1f)<<11) | (((g>>2)&0x3f)<<5) | (((b>>3)&0x1f)<<0) )
|
||||
#define RGBVAL8(r,g,b) ( (((r>>5)&0x07)<<5) | (((g>>5)&0x07)<<2) | (((b>>6)&0x3)<<0) )
|
||||
#define R16(rgb) ((rgb>>8)&0xf8)
|
||||
#define G16(rgb) ((rgb>>3)&0xfc)
|
||||
#define B16(rgb) ((rgb<<3)&0xf8)
|
||||
extern void emu_drawText(unsigned short x, unsigned short y, const char* text, unsigned short fgcolor, unsigned short bgcolor, unsigned short doublesize);
|
||||
|
||||
extern void emu_InitJoysticks(void);
|
||||
extern int emu_SwapJoysticks(int statusOnly);
|
||||
extern unsigned short emu_DebounceLocalKeys(void);
|
||||
extern int emu_ReadKeys(void);
|
||||
extern int emu_GetPad(void);
|
||||
extern int emu_ReadAnalogJoyX(int min, int max);
|
||||
extern int emu_ReadAnalogJoyY(int min, int max);
|
||||
extern int emu_ReadI2CKeyboard(void);
|
||||
extern void emu_KeyboardOnUp(int keymodifer, int key);
|
||||
extern void emu_KeyboardOnDown(int keymodifer, int key);
|
||||
|
||||
extern void emu_sndPlaySound(int chan, int volume, int freq);
|
||||
extern void emu_sndPlayBuzz(int size, int val);
|
||||
extern void emu_sndInit();
|
||||
extern void emu_resetus(void);
|
||||
extern int emu_us(void);
|
||||
|
||||
extern int emu_setKeymap(int index);
|
||||
|
||||
extern void emu_FileTempInit(void);
|
||||
extern void emu_FileTempRead(int addr, unsigned char * val, int n);
|
||||
extern void emu_FileTempWrite(int addr, unsigned char val);
|
||||
extern void emu_printh(int val);
|
||||
|
||||
#endif
|
|
@ -1,30 +0,0 @@
|
|||
.program hello
|
||||
|
||||
; Repeatedly get one word of data from the TX FIFO, stalling when the FIFO is
|
||||
; empty. Write the least significant bit to the OUT pin group.
|
||||
|
||||
loop:
|
||||
pull
|
||||
out pins, 1
|
||||
jmp loop
|
||||
|
||||
% c-sdk {
|
||||
static inline void hello_program_init(PIO pio, uint sm, uint offset, uint pin) {
|
||||
pio_sm_config c = hello_program_get_default_config(offset);
|
||||
|
||||
// Map the state machine's OUT pin group to one pin, namely the 'pin' parameter to this function
|
||||
sm_config_set_out_pins(&c, pin, 1);
|
||||
|
||||
// Set this pin's GPIO function (connect PIO to the pad)
|
||||
pio_gpio_init(pio, pin);
|
||||
|
||||
// Set the pin direction to output at the PIO
|
||||
pio_sm_set_consecutive_pindirs(pio, sm, pin, 1, true);
|
||||
|
||||
// Load our configuration, and jump to the start of the program
|
||||
pio_sm_init(pio, sm, offset, &c);
|
||||
|
||||
// Set the state machine running
|
||||
pio_sm_set_enabled(pio, sm, true);
|
||||
}
|
||||
%}
|
|
@ -41,9 +41,10 @@ int main(void) {
|
|||
while (true) {
|
||||
vga.waitSync();
|
||||
vga.clear(BLUE);
|
||||
vga.drawText((fb_width-320)/2 + 1*8,(fb_height-200)/2+1*8,"fb_width: ",LIGHT_BLUE,BLUE,false);
|
||||
vga.drawText((fb_width-320)/2 + 1*8 + 10*8,(fb_height-200)/2+1*8,width,LIGHT_BLUE,BLUE,false);
|
||||
vga.drawText((fb_width-320)/2 + 1*8,(fb_height-200)/2+3*8,"fb_height: ",LIGHT_BLUE,BLUE,false);
|
||||
vga.drawText((fb_width-320)/2 + 1*8,(fb_height-200)/2+1*8,"Soon to be CPC emulator",LIGHT_BLUE,BLUE,false);
|
||||
vga.drawText((fb_width-320)/2 + 1*8,(fb_height-200)/2+3*8,"fb_width: ",LIGHT_BLUE,BLUE,false);
|
||||
vga.drawText((fb_width-320)/2 + 1*8 + 10*8,(fb_height-200)/2+3*8,width,LIGHT_BLUE,BLUE,false);
|
||||
vga.drawText((fb_width-320)/2 + 1*8,(fb_height-200)/2+5*8,"fb_height: ",LIGHT_BLUE,BLUE,false);
|
||||
vga.drawText((fb_width-320)/2 + 1*8 + 10*8,(fb_height-200)/2+3*8,height,LIGHT_BLUE,BLUE,false);
|
||||
}
|
||||
}
|
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* Sourced from https://github.com/rpsubc8/ESP32TinyCPC
|
||||
*/
|
||||
|
||||
#ifndef ROM_464_H
|
||||
#define ROM_464_H
|
||||
//ROM 464 32768 bytes
|
||||
|
|
Plik diff jest za duży
Load Diff
Plik diff jest za duży
Load Diff
Plik diff jest za duży
Load Diff
Ładowanie…
Reference in New Issue