Einzelnen Beitrag anzeigen
  #3248  
Alt 28.08.2019, 13:49
fhub fhub ist offline
Lebende Foren Legende
 
Registriert seit: 19.04.2010
Beiträge: 2.572
Abgegebene Danke: 431
Erhielt 5.654 Danke für 1.304 Beiträge
Aktivitäten Langlebigkeit
12/20 14/20
Heute Beiträge
1/3 sssss2572
AW: Mess Emulator für diverse Schachcomputer ist fertig!

Hi hap,

I'm trying to write a chess plugin for the Super System III, but I have problems with the plugin getting the moves from the LCD display.

With the debugger I found 2 places with the hexcodes of the LCD digits (:lcd/0/m_shift and :/0/m_lcd_q), but none of the first 2 lines in my following code is working:
Code:
function interface.is_selected(x, y)
	local ddram = emu.item(machine.devices[':lcd'].items['0/m_shift']):read_block(0x00, 0x04)
--	local ddram = emu.item(machine.devices[':maincpu']:owner().items['0/m_lcd_q']):read_block(0x00, 0x04)
	local xval = { 0x77, 0x7c, 0x39, 0x5e, 0x79, 0x71, 0x3d, 0x76 }
	local yval = { 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f }
	local d0 = ddram:sub(0x00,0x00)
	local d1 = ddram:sub(0x01,0x01)
	local d2 = ddram:sub(0x02,0x02)
	local d3 = ddram:sub(0x03,0x03)
	return (xval[x] == d0 and yval[y] == d1) or (xval[x] == d2 and yval[y] == d3)
end
Any idea what's wrong with this code?

Regards,
Franz

Geändert von fhub (28.08.2019 um 14:07 Uhr)
Mit Zitat antworten