Author Topic: porting nova2001  (Read 4550 times)

Offline vbt

  • FBNeo Contributor
  • *****
  • Posts: 205
  • Karma: +9005/-0
porting nova2001
« on: May 24, 2015, 08:55:08 PM »
just trying :)
Code: [Select]
ZetSetReadHandler(nova2001_read);
ZetSetWriteHandler(nova2001_write);

ZetMapArea(0x0000, 0x7fff, 0, Rom + 0x00000);    //ok //fetch
ZetMapArea(0x0000, 0x7fff, 2, Rom + 0x00000);    //ok //read

ZetMapArea(0xa000, 0xb7ff, 0, Rom + 0xa000);
ZetMapArea(0xa000, 0xb7ff, 1, Rom + 0xa000);
ZetMapArea(0xa000, 0xb7ff, 2, Rom + 0xa000);

ZetMapArea(0xe000, 0xe7ff, 0, Rom + 0x0e000);
ZetMapArea(0xe000, 0xe7ff, 1, Rom + 0x0e000);
ZetMapArea(0xe000, 0xe7ff, 2, Rom + 0x0e000);
ZetClose();

on mame :
/*
177 AM_RANGE(0x0000, 0x7fff) AM_ROM
178 AM_RANGE(0xa000, 0xa7ff) AM_RAM_WRITE(nova2001_fg_videoram_w) AM_SHARE("fg_videoram")
179 AM_RANGE(0xa800, 0xafff) AM_RAM_WRITE(nova2001_bg_videoram_w) AM_SHARE("bg_videoram")
180 AM_RANGE(0xb000, 0xb7ff) AM_RAM AM_SHARE("spriteram")
190 AM_RANGE(0xe000, 0xe7ff) AM_RAM
*/

Code: [Select]
malloc :

Rom  = Mem + 0x00000;
spriteram = Rom +0xb000;
videoram = Rom +0xa800;
colorram = Rom +0xac00;
ram = Rom +0xe000;
Gfx0 = Mem + 0x10000;
Gfx1 = Mem + 0x30000;
Palette = (INT32*)(Mem + 0x40000);

added pointers to vram

Code: [Select]
UINT8 __fastcall nova2001_read(UINT16 address)
{
switch (address)
{
//182 AM_RANGE(0xc000, 0xc000) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w)
//183 AM_RANGE(0xc001, 0xc001) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w)

case 0xc000:
return AY8910Read(0);
break;

case 0xc001:
return AY8910Read(1);
break;

case 0xc004:
return 0; //watchdog;        // watchdog_reset_r
case 0xc006:
return DrvInputs[0];        // in0
case 0xc007:
return DrvInputs[1];        // in1
case 0xc00e:
return DrvInputs[2];        // in1
/*
AM_RANGE(0xc004, 0xc004) AM_READ(watchdog_reset_r)
187 AM_RANGE(0xc006, 0xc006) AM_READ_PORT("IN0")
188 AM_RANGE(0xc007, 0xc007) AM_READ_PORT("IN1")
189 AM_RANGE(0xc00e, 0xc00e) AM_READ_PORT("IN2")
*/
}
return 0;
}

void __fastcall nova2001_write(UINT16 address, UINT8 data)
{
switch (address)
{
//AM_RANGE(0xb800, 0xbfff) AM_WRITE(nova2001_flipscreen_w)
case 0xbfff:
flipscreen = ~data & 0x01;
break;
//AM_RANGE(0xc000, 0xc000) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w)
case 0xc000:   // write
AY8910Write(0, 1, data);
break;
//AM_RANGE(0xc002, 0xc002) AM_DEVWRITE("ay1", ay8910_device, address_w)
case 0xc002: // control
AY8910Write(0, 0, data);
break;
//AM_RANGE(0xc001, 0xc001) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w)
case 0xc001: // write
AY8910Write(1, 1, data);
break;
//AM_RANGE(0xc003, 0xc003) AM_DEVWRITE("ay2", ay8910_device, address_w)
case 0xc003: // control
AY8910Write(1, 0, data);
break;
}
}


on mame :
181 AM_RANGE(0xb800, 0xbfff) AM_WRITE(nova2001_flipscreen_w)
182 AM_RANGE(0xc000, 0xc000) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w)
183 AM_RANGE(0xc001, 0xc001) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w)
184 AM_RANGE(0xc002, 0xc002) AM_DEVWRITE("ay1", ay8910_device, address_w)
185 AM_RANGE(0xc003, 0xc003) AM_DEVWRITE("ay2", ay8910_device, address_w)
186 AM_RANGE(0xc004, 0xc004) AM_READ(watchdog_reset_r)
187 AM_RANGE(0xc006, 0xc006) AM_READ_PORT("IN0")
188 AM_RANGE(0xc007, 0xc007) AM_READ_PORT("IN1")
189 AM_RANGE(0xc00e, 0xc00e) AM_READ_PORT("IN2")

any remark ? error ?
« Last Edit: May 24, 2015, 09:30:23 PM by vbt »

Offline vbt

  • FBNeo Contributor
  • *****
  • Posts: 205
  • Karma: +9005/-0
Re: porting nova2001
« Reply #1 on: May 25, 2015, 06:57:15 PM »
ok, it boots, controls are working !!! music is correct, just bad gfx now

just one fix :

   DrvInputs[0] = DrvInputs[1] = DrvInputs[2] = 0x00;//0xff;

   for (INT32 i = 0; i < 8; i++) {
      DrvInputs[0] ^= (DrvJoy1 & 1) << i;
      DrvInputs[1] ^= (DrvJoy2 & 1) << i;
      DrvInputs[2] ^= (DrvJoy3 & 1) << i;
   }




EDIT : now with sprites !!!

« Last Edit: May 25, 2015, 08:36:45 PM by vbt »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: porting nova2001
« Reply #2 on: May 26, 2015, 09:16:28 AM »
Nice work VBT!!


Offline vbt

  • FBNeo Contributor
  • *****
  • Posts: 205
  • Karma: +9005/-0
Re: porting nova2001
« Reply #3 on: May 30, 2015, 10:13:40 PM »


starting to look good :) bg,fb & scrolling are working well  :cool:
still problems with drvinput + bottom of the screen which should not be displayed

Offline dink

  • Administrator
  • *****
  • Posts: 5014
  • Karma: +449/-1
  • pie? I nearly bought one!
Re: porting nova2001
« Reply #4 on: May 31, 2015, 04:12:30 AM »
very excellent, vbt :D
keep up the good work :)

Offline Arcadez

  • Expert
  • *****
  • Posts: 558
  • Karma: +15/-0
  • Arcade Addict
Re: porting nova2001
« Reply #5 on: May 31, 2015, 08:16:32 PM »
@vbt Nice Job your doing on the nova2001 driver

Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: porting nova2001
« Reply #6 on: June 02, 2015, 04:46:10 PM »
Wonderful! What's wrong with the inputs? Ps. The drawing routines should be updated to use generic tile drawing (This driver is from before Barry's fantastic update that included those).


Offline vbt

  • FBNeo Contributor
  • *****
  • Posts: 205
  • Karma: +9005/-0
Re: porting nova2001
« Reply #7 on: June 02, 2015, 06:30:16 PM »
Wonderful! What's wrong with the inputs? Ps. The drawing routines should be updated to use generic tile drawing (This driver is from before Barry's fantastic update that included those).
dink fixed the inputs, about tile drawing, i've noticed it, i may update it.
just one remaining bug, i will fix it!

Offline vbt

  • FBNeo Contributor
  • *****
  • Posts: 205
  • Karma: +9005/-0
Re: porting nova2001
« Reply #8 on: July 19, 2015, 01:04:33 PM »

starting saturn version :)