mtdev79 / z280emu

A portable full system emulator of Z280 based boards
GNU General Public License v2.0
21 stars 3 forks source link

z280rc failed to compile #4

Closed hjkit closed 2 years ago

hjkit commented 2 years ago

I tried to compile z280 with the latest download from github on Ubuntu 18.04 LTS and got the following error message z280rc.c:278:31: error: ‘struct pc16554_device’ has no member named ‘m_chan0’ 278 | ins8250_device_timer(quadser->m_chan0); | ^~ z280rc.c:281:32: error: ‘struct pc16554_device’ has no member named ‘m_chan1’ 281 | ins8250_device_timer(quadser->m_chan1); | ^~ z280rc.c:284:33: error: ‘struct pc16554_device’ has no member named ‘m_chan2’ 284 | ins8250_device_timer(quadser->m_chan2); | ^~ z280rc.c:285:33: error: ‘struct pc16554_device’ has no member named ‘m_chan3’ 285 | ins8250_device_timer(quadser->m_chan3);

agn453 commented 2 years ago

Hector Peraza has a quick fix for this. Until Michal gets a chance to fix this you might try the following context diff for z280rc.c -

--- z280rc.c~ 2021-12-23 19:10:22.000000000 +0100
+++ z280rc.c 2021-12-25 11:56:18.599227768 +0100
@@ -275,14 +275,14 @@

void do_timers() {
if (!--ins8250_clock) {
- ins8250_device_timer(quadser->m_chan0);
+ ins8250_device_timer(quadser->channel[0]);
if (enable_quadser > 1)
{
- ins8250_device_timer(quadser->m_chan1);
+ ins8250_device_timer(quadser->channel[1]);
if (enable_quadser == 4)
{
- ins8250_device_timer(quadser->m_chan2);
- ins8250_device_timer(quadser->m_chan3);
+ ins8250_device_timer(quadser->channel[2]);
+ ins8250_device_timer(quadser->channel[3]);
}
}
ins8250_clock = INS8250_DIVISOR; 

Tony