Previous 199869 Revisions Next

r26239 Sunday 17th November, 2013 at 22:16:27 UTC by Jürgen Buchmüller
Fix ALU carry for several ALUF (use alu, not m_alu)
[/branches/alto2/src/emu/cpu/alto2]alto2.c

branches/alto2/src/emu/cpu/alto2/alto2.c
r26238r26239
7676   AM_RANGE(0177776,                    0177776)                           AM_READWRITE( noop_r, noop_w )          // { Digital-Analog Converter, Joystick }
7777   AM_RANGE(0177777,                    0177777)                           AM_READWRITE( noop_r, noop_w )          // { Digital-Analog Converter, Joystick }
7878
79//   AM_RANGE(0200000,                    0377777)                           AM_READWRITE( ioram_r, ioram_w )
79   AM_RANGE(0200000,                    0377777)                           AM_READWRITE( ioram_r, ioram_w )
8080ADDRESS_MAP_END
8181
8282//-------------------------------------------------
r26238r26239
8686alto2_cpu_device::alto2_cpu_device(const machine_config& mconfig, const char* tag, device_t* owner, UINT32 clock) :
8787   cpu_device(mconfig, ALTO2, "Xerox Alto-II", tag, owner, clock, "alto2", __FILE__),
8888#if   ALTO2_DEBUG
89   m_log_types(LOG_DISK|LOG_KSEC|LOG_KWD),
89   m_log_types(LOG_ALL),
9090   m_log_level(8),
9191   m_log_newline(true),
9292#endif
9393   m_ucode_config("ucode", ENDIANNESS_BIG, 32, 12, -2 ),
9494   m_const_config("const", ENDIANNESS_BIG, 16,  8, -1 ),
95   m_iomem_config("iomem", ENDIANNESS_BIG, 16, 16, -1 ),
95   m_iomem_config("iomem", ENDIANNESS_BIG, 16, 17, -1 ),
9696   m_ucode_crom(0),
9797   m_const_data(0),
9898   m_icount(0),
r26238r26239
26112611
26122612   do {
26132613      int do_bs, flags;
2614      UINT32 alu;
2614      UINT16 alu;
26152615      UINT8 aluf;
26162616      UINT8 bs;
26172617      UINT8 f1;
r26238r26239
28532853         alu = alu_74181(SMC(1,1,1,1, 0, 1));
28542854#else
28552855         alu = m_bus + 0177777;
2856         m_aluc0 = (~m_alu >> 16) & 1;
2856         m_aluc0 = (~alu >> 16) & 1;
28572857#endif
28582858         flags = ALUM2 | TSELECT;
28592859         LOG((LOG_CPU,2,"   ALU← BUS - 1 (%#o := %#o - 1)\n", alu, m_bus));
r26238r26239
28702870         alu = alu_74181(SMC(1,0,0,1, 0, 1));
28712871#else
28722872         alu = m_bus + m_t;
2873         m_aluc0 = (m_alu >> 16) & 1;
2873         m_aluc0 = (alu >> 16) & 1;
28742874#endif
28752875         flags = ALUM2;
28762876         LOG((LOG_CPU,2,"   ALU← BUS + T (%#o := %#o + %#o)\n", alu, m_bus, m_t));
r26238r26239
28872887         alu = alu_74181(SMC(0,1,1,0, 0, 0));
28882888#else
28892889         alu = m_bus + ~m_t + 1;
2890         m_aluc0 = (~m_alu >> 16) & 1;
2890         m_aluc0 = (~alu >> 16) & 1;
28912891#endif
28922892         flags = ALUM2;
28932893         LOG((LOG_CPU,2,"   ALU← BUS - T (%#o := %#o - %#o)\n", alu, m_bus, m_t));
r26238r26239
29042904         alu = alu_74181(SMC(0,1,1,0, 0, 1));
29052905#else
29062906         alu = m_bus + ~m_t;
2907         m_aluc0 = (~m_alu >> 16) & 1;
2907         m_aluc0 = (~alu >> 16) & 1;
29082908#endif
29092909         flags = ALUM2;
29102910         LOG((LOG_CPU,2,"   ALU← BUS - T - 1 (%#o := %#o - %#o - 1)\n", alu, m_bus, m_t));
r26238r26239
29212921         alu = alu_74181(SMC(1,0,0,1, 0, 0));
29222922#else
29232923         alu = m_bus + m_t + 1;
2924         m_aluc0 = (m_alu >> 16) & 1;
2924         m_aluc0 = (alu >> 16) & 1;
29252925#endif
29262926         flags = ALUM2 | TSELECT;
29272927         LOG((LOG_CPU,2,"   ALU← BUS + T + 1 (%#o := %#o + %#o + 1)\n", alu, m_bus, m_t));
r26238r26239
29382938         alu = alu_74181(SMC(0,0,0,0, 0, m_emu.skip^1));
29392939#else
29402940         alu = m_bus + m_emu.skip;
2941         m_aluc0 = (m_alu >> 16) & 1;
2941         m_aluc0 = (alu >> 16) & 1;
29422942#endif
29432943         flags = ALUM2 | TSELECT;
29442944         LOG((LOG_CPU,2,"   ALU← BUS + SKIP (%#o := %#o + %#o)\n", alu, m_bus, m_emu.skip));

Previous 199869 Revisions Next


© 1997-2024 The MAME Team