Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbbert committed Dec 7, 2024
2 parents 6d71885 + 946e138 commit 4935212
Show file tree
Hide file tree
Showing 49 changed files with 2,214 additions and 1,793 deletions.
178 changes: 178 additions & 0 deletions hash/pv1000.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,182 @@ Undumped carts:
</part>
</software>

<!-- Homebrew -->

<software name="aerial">
<description>Aerial</description>
<year>2022</year>
<publisher>Inufuto</publisher>
<part name="cart" interface="pv1000_cart">
<dataarea name="rom" size = "0x4000">
<rom name="aerial.rom" size="0x4000" crc="9d3ddb26" sha1="00630321eef6237501ce099655f3a09cc651d516"/>
</dataarea>
</part>
</software>

<software name="antiair">
<description>AntiAir</description>
<year>2024</year>
<publisher>Inufuto</publisher>
<part name="cart" interface="pv1000_cart">
<dataarea name="rom" size = "0x4000">
<rom name="antiair.rom" size="0x4000" crc="1478db1a" sha1="b0c640776dcdb79db8a7cc8b2387a443182e1036"/>
</dataarea>
</part>
</software>

<software name="ascend">
<description>Ascend</description>
<year>2022</year>
<publisher>Inufuto</publisher>
<part name="cart" interface="pv1000_cart">
<dataarea name="rom" size = "0x4000">
<rom name="ascend.rom" size="0x4000" crc="f9f52261" sha1="8e126055e89de1da6c89a81948d78e50444de395"/>
</dataarea>
</part>
</software>

<software name="battlot">
<description>Battlot</description>
<year>2022</year>
<publisher>Inufuto</publisher>
<part name="cart" interface="pv1000_cart">
<dataarea name="rom" size = "0x4000">
<rom name="battlot.rom" size="0x4000" crc="48c78955" sha1="674a054f657d99705285cc6fd81fe5c0fe507273"/>
</dataarea>
</part>
</software>

<software name="bootskell">
<description>Bootskell</description>
<year>2022</year>
<publisher>Inufuto</publisher>
<part name="cart" interface="pv1000_cart">
<dataarea name="rom" size = "0x4000">
<rom name="bootskell.rom" size="0x4000" crc="8e3222fe" sha1="454d4d8a6c7c7f5d670474e4780d82d2f8f43dee"/>
</dataarea>
</part>
</software>

<software name="cacorm">
<description>Cacorm</description>
<year>2022</year>
<publisher>Inufuto</publisher>
<part name="cart" interface="pv1000_cart">
<dataarea name="rom" size = "0x4000">
<rom name="cacorm.rom" size="0x4000" crc="adfdaf22" sha1="6e4f2c3087fed744f3995ce09c7ed95fce9ef08d"/>
</dataarea>
</part>
</software>

<software name="cavit">
<description>Cavit</description>
<year>2022</year>
<publisher>Inufuto</publisher>
<part name="cart" interface="pv1000_cart">
<dataarea name="rom" size = "0x4000">
<rom name="cavit.rom" size="0x4000" crc="e393d6db" sha1="36bc381207f145d5cf7ee4d86d80ee5b0149ca15"/>
</dataarea>
</part>
</software>

<software name="cracky">
<description>Cracky</description>
<year>2023</year>
<publisher>Inufuto</publisher>
<part name="cart" interface="pv1000_cart">
<dataarea name="rom" size = "0x4000">
<rom name="cracky.rom" size="0x4000" crc="8abdb1f5" sha1="9d2a95467705675503d0a671b3145548fb79a8f0"/>
</dataarea>
</part>
</software>

<software name="guntus">
<description>Guntus</description>
<year>2022</year>
<publisher>Inufuto</publisher>
<part name="cart" interface="pv1000_cart">
<dataarea name="rom" size = "0x4000">
<rom name="guntus.rom" size="0x4000" crc="8cfe7310" sha1="e95cd6f7b7925f9b0dba33d3c58058052287071a"/>
</dataarea>
</part>
</software>

<software name="hopman">
<description>Hopman</description>
<year>2023</year>
<publisher>Inufuto</publisher>
<part name="cart" interface="pv1000_cart">
<dataarea name="rom" size = "0x4000">
<rom name="hopman.rom" size="0x4000" crc="6f72e9ff" sha1="2a07dbdfdfb614b646f2a3457c3ab6d7230d7b90"/>
</dataarea>
</part>
</software>

<software name="lift">
<description>Lift</description>
<year>2022</year>
<publisher>Inufuto</publisher>
<part name="cart" interface="pv1000_cart">
<dataarea name="rom" size = "0x4000">
<rom name="lift.rom" size="0x4000" crc="59a507c5" sha1="655f33cacbb4e927f5816b73faea4662e233b972"/>
</dataarea>
</part>
</software>

<software name="mazy">
<description>Mazy</description>
<year>2022</year>
<publisher>Inufuto</publisher>
<part name="cart" interface="pv1000_cart">
<dataarea name="rom" size = "0x4000">
<rom name="mazy.rom" size="0x4000" crc="a7aea98b" sha1="dd43677f67af8c6da80421b21461274d21c7af58"/>
</dataarea>
</part>
</software>

<software name="neuras">
<description>Neuras</description>
<year>2022</year>
<publisher>Inufuto</publisher>
<part name="cart" interface="pv1000_cart">
<dataarea name="rom" size = "0x4000">
<rom name="neuras.rom" size="0x4000" crc="208817d1" sha1="f69e6ac9f7cf0be9c490a79f97a047982364f341"/>
</dataarea>
</part>
</software>

<software name="osotos">
<description>Osotos</description>
<year>2024</year>
<publisher>Inufuto</publisher>
<part name="cart" interface="pv1000_cart">
<dataarea name="rom" size = "0x4000">
<rom name="osotos.rom" size="0x4000" crc="629ba7e5" sha1="fe263973a09c6c158446ded4dd91e45e201bfa41"/>
</dataarea>
</part>
</software>

<software name="ruptus">
<description>Ruptus</description>
<year>2022</year>
<publisher>Inufuto</publisher>
<part name="cart" interface="pv1000_cart">
<dataarea name="rom" size = "0x4000">
<rom name="ruptus.rom" size="0x4000" crc="f616befc" sha1="a581c771470d3feec70d42d2ad4d41cc475b2f50"/>
</dataarea>
</part>
</software>

<software name="yewdow">
<description>Yewdow</description>
<year>2023</year>
<publisher>Inufuto</publisher>
<part name="cart" interface="pv1000_cart">
<dataarea name="rom" size = "0x4000">
<rom name="yewdow.rom" size="0x4000" crc="a9c8b257" sha1="3b27fbb288c866ddffd7045cf50fb9a8b078a06e"/>
</dataarea>
</part>
</software>

</softwarelist>
31 changes: 17 additions & 14 deletions src/devices/cpu/ccpu/ccpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ DEFINE_DEVICE_TYPE(CCPU, ccpu_cpu_device, "ccpu", "Cinematronics CPU")
MACROS
***************************************************************************/

#define READOP(a) (m_cache.read_byte(a))
#define READOP(a) (m_cache.read_byte(a))

#define RDMEM(a) (m_data.read_word((a) & 0xfff))
#define WRMEM(a,v) (m_data.write_word((a), (v)))
#define RDMEM(a) (m_data.read_word((a) & 0xfff))
#define WRMEM(a,v) (m_data.write_word((a), (v)))

#define READPORT(a) (m_io.read_byte(a))
#define WRITEPORT(a,v) (m_io.write_byte((a), (v)))
#define READPORT(a) (m_io.read_byte(a))
#define WRITEPORT(a,v) (m_io.write_byte((a), (v)))

#define SET_A0 do { m_a0flag = m_A; } while (0)
#define SET_CMP_VAL(x) do { m_cmpacc = *m_acc; m_cmpval = (x) & 0xfff; } while (0)
#define SET_NC(a) do { m_ncflag = ~(a); } while (0)
#define SET_MI(a) do { m_nextnextmiflag = (a); } while (0)
#define SET_CMP_VAL(x) do { m_cmpacc = *m_acc; m_cmpval = (x) & 0xfff; } while (0)
#define SET_NC(a) do { m_ncflag = ~(a); } while (0)
#define SET_MI(a) do { m_nextnextmiflag = (a); } while (0)

#define TEST_A0 (m_a0flag & 1)
#define TEST_NC ((m_ncflag >> 12) & 1)
Expand All @@ -52,10 +52,10 @@ DEFINE_DEVICE_TYPE(CCPU, ccpu_cpu_device, "ccpu", "Cinematronics CPU")
#define STANDARD_ACC_OP(resexp,cmpval) \
do { \
uint16_t result = resexp; \
SET_A0; /* set the A0 bit based on the previous 'A' value */ \
SET_CMP_VAL(cmpval); /* set the compare values to the previous accumulator and the cmpval */ \
SET_NC(result); /* set the NC flag based on the unmasked result */ \
*m_acc = result & 0xfff; /* store the low 12 bits of the new value */ \
SET_A0; /* set the A0 bit based on the previous 'A' value */ \
SET_CMP_VAL(cmpval); /* set the compare values to the previous accumulator and the cmpval */ \
SET_NC(result); /* set the NC flag based on the unmasked result */ \
*m_acc = result & 0xfff; /* store the low 12 bits of the new value */ \
} while (0)


Expand Down Expand Up @@ -92,12 +92,15 @@ uint8_t ccpu_cpu_device::read_jmi()
}


void ccpu_cpu_device::wdt_timer_trigger()
void ccpu_cpu_device::wdt_trigger(int state)
{
if (!state)
return;

m_waiting = false;
m_watchdog++;
if (m_watchdog >= 3)
m_PC = 0;
device_reset();
}


Expand Down
46 changes: 23 additions & 23 deletions src/devices/cpu/ccpu/ccpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ccpu_cpu_device : public cpu_device
// public because the cinemat driver accesses A/P/X/Y through state interace - should there be a proper public interface to read registers?
enum
{
CCPU_PC=1,
CCPU_PC = 1,
CCPU_FLAGS,
CCPU_A,
CCPU_B,
Expand All @@ -50,7 +50,7 @@ class ccpu_cpu_device : public cpu_device
template <typename... T> void set_vector_func(T &&... args) { m_vector_callback.set(std::forward<T>(args)...); }

uint8_t read_jmi();
void wdt_timer_trigger();
void wdt_trigger(int state);

protected:
// device-level overrides
Expand All @@ -75,27 +75,27 @@ class ccpu_cpu_device : public cpu_device
address_space_config m_data_config;
address_space_config m_io_config;

uint16_t m_PC;
uint16_t m_A;
uint16_t m_B;
uint8_t m_I;
uint16_t m_J;
uint8_t m_P;
uint16_t m_X;
uint16_t m_Y;
uint16_t m_T;
uint16_t * m_acc;

uint16_t m_a0flag, m_ncflag, m_cmpacc, m_cmpval;
uint16_t m_miflag, m_nextmiflag, m_nextnextmiflag;
uint16_t m_drflag;

devcb_read8 m_external_input;
vector_delegate m_vector_callback;

uint8_t m_waiting;
uint8_t m_watchdog;
uint8_t m_extinput;
uint16_t m_PC;
uint16_t m_A;
uint16_t m_B;
uint8_t m_I;
uint16_t m_J;
uint8_t m_P;
uint16_t m_X;
uint16_t m_Y;
uint16_t m_T;
uint16_t * m_acc;

uint16_t m_a0flag, m_ncflag, m_cmpacc, m_cmpval;
uint16_t m_miflag, m_nextmiflag, m_nextnextmiflag;
uint16_t m_drflag;

devcb_read8 m_external_input;
vector_delegate m_vector_callback;

uint8_t m_waiting;
uint8_t m_watchdog;
uint8_t m_extinput;

int m_icount;

Expand Down
Loading

0 comments on commit 4935212

Please sign in to comment.