add usb HUB by default

This commit is contained in:
jean-marcharvengt 2020-11-22 16:56:33 +01:00
parent 77cb348ff8
commit b3ee7d92b0
26 changed files with 34 additions and 10 deletions

View file

@ -31,6 +31,7 @@ static const uint16_t * logo = deflogo;
#ifdef HAS_USBKEY #ifdef HAS_USBKEY
#include "USBHost_t36.h" // Read this header first for key info #include "USBHost_t36.h" // Read this header first for key info
USBHost myusb; USBHost myusb;
USBHub hub1(myusb);
KeyboardController keyboard1(myusb); KeyboardController keyboard1(myusb);
#endif #endif
static uint8_t usbnavpad=0; static uint8_t usbnavpad=0;

View file

@ -31,6 +31,7 @@ static const uint16_t * logo = deflogo;
#ifdef HAS_USBKEY #ifdef HAS_USBKEY
#include "USBHost_t36.h" // Read this header first for key info #include "USBHost_t36.h" // Read this header first for key info
USBHost myusb; USBHost myusb;
USBHub hub1(myusb);
KeyboardController keyboard1(myusb); KeyboardController keyboard1(myusb);
#endif #endif
static uint8_t usbnavpad=0; static uint8_t usbnavpad=0;

View file

@ -31,6 +31,7 @@ static const uint16_t * logo = deflogo;
#ifdef HAS_USBKEY #ifdef HAS_USBKEY
#include "USBHost_t36.h" // Read this header first for key info #include "USBHost_t36.h" // Read this header first for key info
USBHost myusb; USBHost myusb;
USBHub hub1(myusb);
KeyboardController keyboard1(myusb); KeyboardController keyboard1(myusb);
#endif #endif
static uint8_t usbnavpad=0; static uint8_t usbnavpad=0;

View file

@ -31,6 +31,7 @@ static const uint16_t * logo = deflogo;
#ifdef HAS_USBKEY #ifdef HAS_USBKEY
#include "USBHost_t36.h" // Read this header first for key info #include "USBHost_t36.h" // Read this header first for key info
USBHost myusb; USBHost myusb;
USBHub hub1(myusb);
KeyboardController keyboard1(myusb); KeyboardController keyboard1(myusb);
#endif #endif
static uint8_t usbnavpad=0; static uint8_t usbnavpad=0;

View file

@ -34,6 +34,7 @@ static const unsigned short * keysw = keyswzx80;
#ifdef HAS_USBKEY #ifdef HAS_USBKEY
#include "USBHost_t36.h" // Read this header first for key info #include "USBHost_t36.h" // Read this header first for key info
USBHost myusb; USBHost myusb;
USBHub hub1(myusb);
KeyboardController keyboard1(myusb); KeyboardController keyboard1(myusb);
#endif #endif
static uint8_t usbnavpad=0; static uint8_t usbnavpad=0;

View file

@ -94,7 +94,7 @@ void emu_DrawLine(unsigned char * VBuf, int width, int height, int line)
{ {
if (!vgaMode) { if (!vgaMode) {
#ifdef HAS_T4_VGA #ifdef HAS_T4_VGA
tft.writeLine(width,1,line, VBuf, palette8); tft.writeLine(width,height,line, VBuf, palette8);
#else #else
tft.writeLine(width,1,line, VBuf, palette16); tft.writeLine(width,1,line, VBuf, palette16);
#endif #endif

View file

@ -31,6 +31,7 @@ static const int16_t * logo = deflogo;
#ifdef HAS_USBKEY #ifdef HAS_USBKEY
#include "USBHost_t36.h" // Read this header first for key info #include "USBHost_t36.h" // Read this header first for key info
USBHost myusb; USBHost myusb;
USBHub hub1(myusb);
KeyboardController keyboard1(myusb); KeyboardController keyboard1(myusb);
#endif #endif
static uint8_t usbnavpad=0; static uint8_t usbnavpad=0;

View file

@ -93,7 +93,7 @@ void emu_DrawLine(unsigned char * VBuf, int width, int height, int line)
{ {
if (!vgaMode) { if (!vgaMode) {
#ifdef HAS_T4_VGA #ifdef HAS_T4_VGA
tft.writeLine(width,1,line, VBuf, palette8); tft.writeLine(width,height,line, VBuf, palette8);
#else #else
tft.writeLine(width,1,line, VBuf, palette16); tft.writeLine(width,1,line, VBuf, palette16);
#endif #endif

View file

@ -31,6 +31,7 @@ static const uint16_t * logo = deflogo;
#ifdef HAS_USBKEY #ifdef HAS_USBKEY
#include "USBHost_t36.h" // Read this header first for key info #include "USBHost_t36.h" // Read this header first for key info
USBHost myusb; USBHost myusb;
USBHub hub1(myusb);
KeyboardController keyboard1(myusb); KeyboardController keyboard1(myusb);
#endif #endif
static uint8_t usbnavpad=0; static uint8_t usbnavpad=0;

View file

@ -91,7 +91,7 @@ void emu_DrawLine(unsigned char * VBuf, int width, int height, int line)
{ {
if (!vgaMode) { if (!vgaMode) {
#ifdef HAS_T4_VGA #ifdef HAS_T4_VGA
tft.writeLine(width,1,line, VBuf, palette8); tft.writeLine(width,height,line, VBuf, palette8);
#else #else
tft.writeLine(width,1,line, VBuf, palette16); tft.writeLine(width,1,line, VBuf, palette16);
#endif #endif

View file

@ -31,6 +31,7 @@ static const uint16_t * logo = deflogo;
#ifdef HAS_USBKEY #ifdef HAS_USBKEY
#include "USBHost_t36.h" // Read this header first for key info #include "USBHost_t36.h" // Read this header first for key info
USBHost myusb; USBHost myusb;
USBHub hub1(myusb);
KeyboardController keyboard1(myusb); KeyboardController keyboard1(myusb);
#endif #endif
static uint8_t usbnavpad=0; static uint8_t usbnavpad=0;

View file

@ -31,6 +31,7 @@ static const uint16_t * logo = deflogo;
#ifdef HAS_USBKEY #ifdef HAS_USBKEY
#include "USBHost_t36.h" // Read this header first for key info #include "USBHost_t36.h" // Read this header first for key info
USBHost myusb; USBHost myusb;
USBHub hub1(myusb);
KeyboardController keyboard1(myusb); KeyboardController keyboard1(myusb);
#endif #endif
static uint8_t usbnavpad=0; static uint8_t usbnavpad=0;

View file

@ -31,6 +31,7 @@ static const int16_t * logo = deflogo;
#ifdef HAS_USBKEY #ifdef HAS_USBKEY
#include "USBHost_t36.h" // Read this header first for key info #include "USBHost_t36.h" // Read this header first for key info
USBHost myusb; USBHost myusb;
USBHub hub1(myusb);
KeyboardController keyboard1(myusb); KeyboardController keyboard1(myusb);
#endif #endif
static uint8_t usbnavpad=0; static uint8_t usbnavpad=0;

View file

@ -31,6 +31,7 @@ static const int16_t * logo = deflogo;
#ifdef HAS_USBKEY #ifdef HAS_USBKEY
#include "USBHost_t36.h" // Read this header first for key info #include "USBHost_t36.h" // Read this header first for key info
USBHost myusb; USBHost myusb;
USBHub hub1(myusb);
KeyboardController keyboard1(myusb); KeyboardController keyboard1(myusb);
#endif #endif
static uint8_t usbnavpad=0; static uint8_t usbnavpad=0;

View file

@ -31,6 +31,7 @@ static const uint16_t * logo = deflogo;
#ifdef HAS_USBKEY #ifdef HAS_USBKEY
#include "USBHost_t36.h" // Read this header first for key info #include "USBHost_t36.h" // Read this header first for key info
USBHost myusb; USBHost myusb;
USBHub hub1(myusb);
KeyboardController keyboard1(myusb); KeyboardController keyboard1(myusb);
#endif #endif
static uint8_t usbnavpad=0; static uint8_t usbnavpad=0;

View file

@ -31,6 +31,7 @@ static const uint16_t * logo = deflogo;
#ifdef HAS_USBKEY #ifdef HAS_USBKEY
#include "USBHost_t36.h" // Read this header first for key info #include "USBHost_t36.h" // Read this header first for key info
USBHost myusb; USBHost myusb;
USBHub hub1(myusb);
KeyboardController keyboard1(myusb); KeyboardController keyboard1(myusb);
#endif #endif
static uint8_t usbnavpad=0; static uint8_t usbnavpad=0;

View file

@ -94,7 +94,7 @@ void emu_DrawLine(unsigned char * VBuf, int width, int height, int line)
{ {
if (!vgaMode) { if (!vgaMode) {
#ifdef HAS_T4_VGA #ifdef HAS_T4_VGA
tft.writeLine(width,1,line, VBuf, palette8); tft.writeLine(width,height,line, VBuf, palette8);
#else #else
tft.writeLine(width,1,line, VBuf, palette16); tft.writeLine(width,1,line, VBuf, palette16);
#endif #endif

View file

@ -31,6 +31,7 @@ static const int16_t * logo = deflogo;
#ifdef HAS_USBKEY #ifdef HAS_USBKEY
#include "USBHost_t36.h" // Read this header first for key info #include "USBHost_t36.h" // Read this header first for key info
USBHost myusb; USBHost myusb;
USBHub hub1(myusb);
KeyboardController keyboard1(myusb); KeyboardController keyboard1(myusb);
#endif #endif
static uint8_t usbnavpad=0; static uint8_t usbnavpad=0;

View file

@ -93,7 +93,7 @@ void emu_DrawLine(unsigned char * VBuf, int width, int height, int line)
{ {
if (!vgaMode) { if (!vgaMode) {
#ifdef HAS_T4_VGA #ifdef HAS_T4_VGA
tft.writeLine(width,1,line, VBuf, palette8); tft.writeLine(width,height,line, VBuf, palette8);
#else #else
tft.writeLine(width,1,line, VBuf, palette16); tft.writeLine(width,1,line, VBuf, palette16);
#endif #endif

View file

@ -31,6 +31,7 @@ static const int16_t * logo = deflogo;
#ifdef HAS_USBKEY #ifdef HAS_USBKEY
#include "USBHost_t36.h" // Read this header first for key info #include "USBHost_t36.h" // Read this header first for key info
USBHost myusb; USBHost myusb;
USBHub hub1(myusb);
KeyboardController keyboard1(myusb); KeyboardController keyboard1(myusb);
#endif #endif
static uint8_t usbnavpad=0; static uint8_t usbnavpad=0;

View file

@ -93,7 +93,7 @@ void emu_DrawLine(unsigned char * VBuf, int width, int height, int line)
{ {
if (!vgaMode) { if (!vgaMode) {
#ifdef HAS_T4_VGA #ifdef HAS_T4_VGA
tft.writeLine(width,1,line, VBuf, palette8); tft.writeLine(width,height,line, VBuf, palette8);
#else #else
tft.writeLine(width,1,line, VBuf, palette16); tft.writeLine(width,1,line, VBuf, palette16);
#endif #endif

View file

@ -31,6 +31,7 @@ static const uint16_t * logo = deflogo;
#ifdef HAS_USBKEY #ifdef HAS_USBKEY
#include "USBHost_t36.h" // Read this header first for key info #include "USBHost_t36.h" // Read this header first for key info
USBHost myusb; USBHost myusb;
USBHub hub1(myusb);
KeyboardController keyboard1(myusb); KeyboardController keyboard1(myusb);
#endif #endif
static uint8_t usbnavpad=0; static uint8_t usbnavpad=0;

View file

@ -94,7 +94,7 @@ void emu_DrawLine(unsigned char * VBuf, int width, int height, int line)
{ {
if (!vgaMode) { if (!vgaMode) {
#ifdef HAS_T4_VGA #ifdef HAS_T4_VGA
tft.writeLine(width,1,line, VBuf, palette8); tft.writeLine(width,height,line, VBuf, palette8);
#else #else
tft.writeLine(width,1,line, VBuf, palette16); tft.writeLine(width,1,line, VBuf, palette16);
#endif #endif

View file

@ -139,6 +139,7 @@ extern void emu_DrawLine8(unsigned char * VBuf, int width, int height, int line)
extern void emu_DrawVsync(void); extern void emu_DrawVsync(void);
extern int emu_FrameSkip(void); extern int emu_FrameSkip(void);
extern void * emu_LineBuffer(int line); extern void * emu_LineBuffer(int line);
extern void emu_tweakVideo(int shiftdelta, int numdelta, int denomdelta);
extern void emu_InitJoysticks(void); extern void emu_InitJoysticks(void);
extern int emu_SwapJoysticks(int statusOnly); extern int emu_SwapJoysticks(int statusOnly);

View file

@ -195,6 +195,12 @@ void * emu_LineBuffer(int line)
#endif #endif
} }
void emu_tweakVideo(int shiftdelta, int numdelta, int denomdelta) {
#ifdef HAS_T4_VGA
tft.tweak_video(shiftdelta, numdelta, denomdelta);
#endif
}
// **************************************************** // ****************************************************
// the setup() method runs once, when the sketch starts // the setup() method runs once, when the sketch starts

View file

@ -486,9 +486,9 @@ void flush_line(int y)
{ {
if(y >= 0 && y < WIN_H) { if(y >= 0 && y < WIN_H) {
#ifdef HAS_T4_VGA #ifdef HAS_T4_VGA
emu_DrawLine8((unsigned char *)slinebuf, WIN_W , 1, y); emu_DrawLine8((unsigned char *)slinebuf, WIN_W , WIN_H, y);
#else #else
emu_DrawLine16((unsigned short *)slinebuf, WIN_W , 1, y); emu_DrawLine16((unsigned short *)slinebuf, WIN_W , WIN_H, y);
#endif #endif
} }
} }
@ -524,7 +524,8 @@ static bool pdown=true;
void flush_screen(int ystart,int ystop) void flush_screen(int ystart,int ystop)
{ {
emu_DrawVsync(); emu_DrawVsync();
emu_tweakVideo(1,0,0);
// #sample written per frame // #sample written per frame
int wdelta = 0; int wdelta = 0;
uae_u32 wdpt = sndbufpt; uae_u32 wdpt = sndbufpt;