summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Angelo Salese <angelosa@users.noreply.github.com>2014-04-15 23:50:45 +0000
committer Angelo Salese <angelosa@users.noreply.github.com>2014-04-15 23:50:45 +0000
commit4b3da60e079e1b4223181dd3880e836c1206db2a (patch)
tree6f424880e0c289b4d4d9288a787e074aa90a0f06 /src
parentdfc6a4a16f2a8c08400fe3bb0e90fa86e0ab8d3b (diff)
Attempt to hook up a bunch of floppy related bits to no avail, nw
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/model2.c3
-rw-r--r--src/mame/includes/archimds.h2
-rw-r--r--src/mame/machine/archimds.c59
-rw-r--r--src/mess/drivers/a310.c13
4 files changed, 64 insertions, 13 deletions
diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c
index 4d6bbe1c9fb..58133d4dd3a 100644
--- a/src/mame/drivers/model2.c
+++ b/src/mame/drivers/model2.c
@@ -887,6 +887,7 @@ void model2_state::push_geo_data(UINT32 data)
READ32_MEMBER(model2_state::geo_prg_r)
{
+ popmessage("Read from Geometry FIFO at %08x, contact MAMEdev",offset*4);
return 0xffffffff;
}
@@ -970,6 +971,8 @@ WRITE32_MEMBER(model2_state::geo_w)
UINT32 r = 0;
r |= data & 0x000fffff;
r |= ((address >> 4) & 0x3f) << 23;
+ if((address >> 4) & 0xc0)
+ popmessage("Eye mode? Contact MAMEdev");
push_geo_data(r);
}
}
diff --git a/src/mame/includes/archimds.h b/src/mame/includes/archimds.h
index d7c622c0677..632cc990961 100644
--- a/src/mame/includes/archimds.h
+++ b/src/mame/includes/archimds.h
@@ -133,6 +133,8 @@ private:
bool m_cursor_enabled;
emu_timer *m_timer[4], *m_snd_timer, *m_vid_timer;
emu_timer *m_vbl_timer;
+ UINT8 m_floppy_select;
+ bool check_floppy_ready();
};
/* IOC registers */
diff --git a/src/mame/machine/archimds.c b/src/mame/machine/archimds.c
index ae24ee9e329..061c3d00a9c 100644
--- a/src/mame/machine/archimds.c
+++ b/src/mame/machine/archimds.c
@@ -476,6 +476,27 @@ void archimedes_state::latch_timer_cnt(int tmr)
m_ioc_timerout[tmr] = m_ioc_timercnt[tmr] - (UINT32)time;
}
+bool archimedes_state::check_floppy_ready()
+{
+ floppy_image_device *floppy = NULL;
+
+ if(!m_fdc)
+ return false;
+
+ switch(m_floppy_select & 3)
+ {
+ case 0:
+ floppy = m_floppy0->get_device(); break;
+ case 1:
+ floppy = m_floppy1->get_device(); break;
+ }
+
+ if(floppy)
+ return floppy->ready_r();
+
+ return false;
+}
+
/* TODO: should be a 8-bit handler */
READ32_MEMBER( archimedes_state::ioc_ctrl_r )
{
@@ -487,8 +508,9 @@ READ32_MEMBER( archimedes_state::ioc_ctrl_r )
case CONTROL:
{
UINT8 i2c_data = 1;
- static UINT8 flyback; //internal name for vblank here
+ UINT8 flyback; //internal name for vblank here
int vert_pos;
+ bool floppy_ready_state;
vert_pos = m_screen->vpos();
flyback = (vert_pos <= m_vidc_regs[VIDC_VDSR] || vert_pos >= m_vidc_regs[VIDC_VDER]) ? 0x80 : 0x00;
@@ -498,7 +520,9 @@ READ32_MEMBER( archimedes_state::ioc_ctrl_r )
i2c_data = (m_i2cmem->read_sda() & 1);
}
- return (flyback) | (m_ioc_regs[CONTROL] & 0x7c) | (m_i2c_clk<<1) | i2c_data;
+ floppy_ready_state = check_floppy_ready();
+
+ return (flyback) | (m_ioc_regs[CONTROL] & 0x78) | (floppy_ready_state<<2) | (m_i2c_clk<<1) | i2c_data;
}
case KART: // keyboard read
@@ -567,6 +591,17 @@ WRITE32_MEMBER( archimedes_state::ioc_ctrl_w )
m_i2cmem->write_scl((data & 0x02) >> 1);
}
m_i2c_clk = (data & 2) >> 1;
+ //TODO: does writing bit 2 here causes a fdc force ready?
+ /*
+ -x-- ---- Printer ack
+ --x- ---- Sound mute
+ ---x ---- Aux I/O connector
+ ---- -x-- Floppy ready
+ ---- --x- I2C clock
+ ---- ---x I2C data
+ */
+ //if(data & 0x40)
+ // popmessage("Muting sound, contact MAME/MESSdev");
break;
case KART:
@@ -801,16 +836,26 @@ WRITE32_MEMBER(archimedes_state::archimedes_ioc_w)
switch(ioc_addr & 0xfffc)
{
case 0x18: // latch B
+ /*
+ ---- x--- floppy controller reset
+ */
m_fdc->dden_w(BIT(data, 1));
+ if(data & 8)
+ m_fdc->soft_reset();
+ if(data & ~0xa)
+ printf("%02x Latch B\n",data);
return;
case 0x40: // latch A
+ /*
+ -x-- ---- In Use Control (floppy?)
+ */
floppy_image_device *floppy = NULL;
- if (!(data & 1)) { floppy = m_floppy0->get_device(); }
- if (!(data & 2)) { floppy = m_floppy1->get_device(); }
- if (!(data & 4)) { floppy = NULL; } // floppy 2
- if (!(data & 8)) { floppy = NULL; } // floppy 3
+ if (!(data & 1)) { m_floppy_select = 0; floppy = m_floppy0->get_device(); }
+ if (!(data & 2)) { m_floppy_select = 1; floppy = m_floppy1->get_device(); }
+ if (!(data & 4)) { m_floppy_select = 2; floppy = NULL; } // floppy 2
+ if (!(data & 8)) { m_floppy_select = 3; floppy = NULL; } // floppy 3
m_fdc->set_floppy(floppy);
@@ -970,7 +1015,7 @@ WRITE32_MEMBER(archimedes_state::archimedes_vidc_w)
//#ifdef MAME_DEBUG
- if(1)
+ if(reg != VIDC_VCSR && reg != VIDC_VCER && reg != VIDC_HCSR)
logerror("VIDC: %s = %d\n", vrnames[(reg-0x80)/4], m_vidc_regs[reg]);
//#endif
diff --git a/src/mess/drivers/a310.c b/src/mess/drivers/a310.c
index ff63c9c02d8..0b33378e8ce 100644
--- a/src/mess/drivers/a310.c
+++ b/src/mess/drivers/a310.c
@@ -9,13 +9,14 @@
* Angelo Salese, August 2010
*
* TODO:
+ * - Make floppies to work;
+ * - Attempting to load the GUI gives an exception;
+ * - Graphics in GUI misses some vram data on the right edges (for example white vertical stripe on the far right), rmw bug related to the above?
+ * - Apparently same deal happens to Arthur OS, on a bunch of icons;
+ * - Hook up mouse in AAKART;
+ * - Add shifted version of keyboard inputs, necessary especially for loading programs thru Supervisor Mode;
* - try to understand why bios 2 was working at some point and now isn't
- * - fix RISC OS / Arthur booting, possible causes:
- * \- missing reset page size hook-up
- * \- some subtle memory paging fault
- * \- missing RAM max size
- * \- ARM bug?
- * - 38776b8
+ *
*
*
=======================================================================================