Enterprise Forever
:UK => Programming => Topic started by: gflorez on 2016.June.01. 19:07:44
-
Probably this is a silly question, if it could be done it would be already made, I guess....
I don't know a word of Lua, only that it serves to modify subtle aspects of the emulator, to put breakpoints or write the memory.
But, can I use Lua to take the PC mouse data and parse it to the B6 Z80 port like LGB does inside his emulator?
-
can I use Lua to take the PC mouse data
I think there is the problem :-(
-
yes
I want to make mouse controlled basic games :)
-
ep128emu sources are available.
Just needed someone who can do the further develop...
-
yes
I want to make mouse controlled basic games :)
You can do it easily with XEP128 using this SD-image:
https://www.dropbox.com/s/gn6sj8165ytep22/sdcard.rar?dl=0
It autostarts in the EGI, with a wonderful mouse driver usable in Basic.....
I don't know if they are the latest versions, but you can download them from the EnterMice wiki.
You can transfer your Basic programs to the image with Winimage.
-
ep128emu sources are available.
Just needed someone who can do the further develop...
It is a hard work for me... I only understand a little of C, and this is C++. But I can put an eye on the controllers part.
-
The definition of port B6 is inside "dave.cpp", because from the emulator point of view it is a Dave port.
Write port B5:
keyboardRow = int(value & 0x0F);
tape_feedback = int(!(value & 0x20)); // tape control
setRemote1State(value & 0x40 ? 1 : 0);
setRemote2State(value & 0x80 ? 1 : 0);
Read port B6:
{
uint8_t n = 0x01;
if (keyboardRow < 5) {
// external joystick 1 (mapped to keyboard row 14)
n = uint8_t((unsigned int) keyboardState[14] >> (4 - keyboardRow));
}
else if (keyboardRow < 10) {
// external joystick 2 (mapped to keyboard row 15)
n = uint8_t((unsigned int) keyboardState[15] >> (9 - keyboardRow));
}
// tape input
n = uint8_t((n & 0x01) | 0x0E | ((tape_input_level - 1) & 0x40)
| ((tape_input - 1) & 0x80));
return n;
}
Writing to B7 port(RTS) is not defined.