Previous 199869 Revisions Next

r26246 Monday 18th November, 2013 at 00:26:53 UTC by Jürgen Buchmüller
Refactor display to use a screen bitmap that is updated whenever a word changes.
[/branches/alto2/src/emu/cpu/alto2]a2disp.c alto2.c alto2.h
[/branches/alto2/src/emu/machine]diablo_hd.h
[/branches/alto2/src/mess/drivers]alto2.c
[/branches/alto2/src/mess/includes]alto2.h

branches/alto2/src/emu/machine/diablo_hd.h
r26245r26246
1313#include "imagedev/diablo.h"
1414
1515#ifndef   DIABLO_DEBUG
16#define   DIABLO_DEBUG   1      //!< set to 1 to enable debug log output
16#define   DIABLO_DEBUG   0      //!< set to 1 to enable debug log output
1717#endif
1818
1919#define DIABLO_HD_0 "diablo0"
branches/alto2/src/emu/cpu/alto2/alto2.c
r26245r26246
158158   m_disp_a38(0),
159159   m_disp_a63(0),
160160   m_disp_a66(0),
161   m_displ_bitmap(0),
161162   m_mem(),
162163   m_emu(),
163164   m_ether_a41(0),
r26245r26246
26122613   do {
26132614      int do_bs, flags;
26142615      UINT32 alu;
2615      UINT8 aluf;
2616      UINT8 bs;
2617      UINT8 f1;
2618      UINT8 f2;
26192616
26202617      /*
26212618       * Subtract the microcycle time from the display time accu.
r26245r26246
26632660      m_rsel = MIR_RSEL(m_mir);
26642661      m_next = MIR_NEXT(m_mir) | m_next2;
26652662      m_next2 = A2_GET32(RD_CROM(m_next), 32, NEXT0, NEXT9) | (m_next2 & ~ALTO2_UCODE_PAGE_MASK);
2666      aluf = MIR_ALUF(m_mir);
2667      bs = MIR_BS(m_mir);
2668      f1 = MIR_F1(m_mir);
2669      f2 = MIR_F2(m_mir);
2663      UINT8 aluf = MIR_ALUF(m_mir);
2664      UINT8 bs = MIR_BS(m_mir);
2665      UINT8 f1 = MIR_F1(m_mir);
2666      UINT8 f2 = MIR_F2(m_mir);
26702667      LOG((LOG_CPU,2,"%s-%04o: %011o r:%02o aluf:%02o bs:%02o f1:%02o f2:%02o t:%o l:%o next:%05o next2:%05o\n",
26712668         task_name(m_task), m_mpc, m_mir, m_rsel, aluf, bs, f1, f2, MIR_T(m_mir), MIR_L(m_mir), m_next, m_next2));
26722669      debugger_instruction_hook(this, m_mpc);
branches/alto2/src/emu/cpu/alto2/a2disp.c
r26245r26246
189189   0xffc0,0xffc3,0xffcc,0xffcf,0xfff0,0xfff3,0xfffc,0xffff
190190};
191191
192#define   BLACK   1
193#define   WHITE   0
194
195//! update the internal bitmap to the MAME bitmap.pix16
196void alto2_cpu_device::update_bitmap_word(int x, int y, UINT16 word)
197{
198   UINT16* pix = &m_displ_bitmap->pix16(y) + x;
199   *pix++ = (word & 0100000) ? BLACK : WHITE;
200   *pix++ = (word & 0040000) ? BLACK : WHITE;
201   *pix++ = (word & 0020000) ? BLACK : WHITE;
202   *pix++ = (word & 0010000) ? BLACK : WHITE;
203   *pix++ = (word & 0004000) ? BLACK : WHITE;
204   *pix++ = (word & 0002000) ? BLACK : WHITE;
205   *pix++ = (word & 0001000) ? BLACK : WHITE;
206   *pix++ = (word & 0000400) ? BLACK : WHITE;
207   *pix++ = (word & 0000200) ? BLACK : WHITE;
208   *pix++ = (word & 0000100) ? BLACK : WHITE;
209   *pix++ = (word & 0000040) ? BLACK : WHITE;
210   *pix++ = (word & 0000020) ? BLACK : WHITE;
211   *pix++ = (word & 0000010) ? BLACK : WHITE;
212   *pix++ = (word & 0000004) ? BLACK : WHITE;
213   *pix++ = (word & 0000002) ? BLACK : WHITE;
214   *pix++ = (word & 0000001) ? BLACK : WHITE;
215}
216
192217/**
193218 * @brief unload the next word from the display FIFO and shift it to the screen
194219 */
r26245r26246
196221{
197222   int y = ((m_dsp.hlc - m_dsp.vblank) & ~(1024|1)) + HLC1024();
198223   UINT16* scanline = m_dsp.scanline[y];
199   UINT8 dirty = m_dsp.scanline_dirty[y];
200224
201225   UINT32 word = m_dsp.inverse;
202226   if (FIFO_MBEMPTY_0() == 0) {
r26245r26246
210234
211235   if (y >= 0 && y < ALTO2_DISPLAY_HEIGHT && x < ALTO2_DISPLAY_VISIBLE_WORDS) {
212236      if (m_dsp.halfclock) {
213         UINT32 word1 = double_bits[word / 256];
214         UINT32 word2 = double_bits[word % 256];
237         UINT16 word1 = double_bits[word / 256];
238         UINT16 word2 = double_bits[word % 256];
215239         /* mixing with the cursor */
216240         if (x == m_dsp.curword + 0)
217241            word1 ^= m_dsp.curdata >> 16;
r26245r26246
219243            word1 ^= m_dsp.curdata & 0177777;
220244         if (word1 != scanline[x]) {
221245            scanline[x] = word1;
222            dirty = 1;
246            update_bitmap_word(16 * x, y, word1);
223247         }
224248         x++;
225249         if (x < ALTO2_DISPLAY_VISIBLE_WORDS) {
r26245r26246
230254               word2 ^= m_dsp.curdata & 0177777;
231255            if (word2 != scanline[x]) {
232256               scanline[x] = word2;
233               dirty = 1;
257               update_bitmap_word(16 * x, y, word2);
234258            }
235259            x++;
236260         }
r26245r26246
242266            word ^= m_dsp.curdata & 0177777;
243267         if (word != scanline[x]) {
244268            scanline[x] = word;
245            dirty = 1;
269            update_bitmap_word(16 * x, y, word);
246270         }
247271         x++;
248272      }
249273   }
250   m_dsp.scanline_dirty[y] = dirty;
251274   if (x < ALTO2_DISPLAY_VISIBLE_WORDS) {
252275      m_unload_time += ALTO2_DISPLAY_BITTIME(m_dsp.halfclock ? 32 : 16);
253276      return x;
r26245r26246
277300
278301   a63 = m_disp_a63[arg];
279302
280   if (A2_HLCGATE_HI(a63)) {
303   if (A63_HLCGATE_HI(a63)) {
281304      /* reset or count horizontal line counters */
282305      if (m_dsp.hlc == ALTO2_DISPLAY_HLC_END)
283306         m_dsp.hlc = ALTO2_DISPLAY_HLC_START;
r26245r26246
301324   // next address from PROM a63, use A4 from HLC1
302325   next = (16 * (HLC1() ^ 1)) | A63_NEXT(a63);
303326
304   if (A2_VBLANK_HI(a66)) {
327   if (A66_VBLANK_HI(a66, HLC1024())) {
305328      /* VBLANK: remember hlc */
306329      m_dsp.vblank = m_dsp.hlc | 1;
307330
308331      LOG((LOG_DISPL,1, " VBLANK"));
309332
310333      /* VSYNC is always within VBLANK */
311      if (A2_VSYNC_HI(a66)) {
312         if (A2_VSYNC_LO(m_dsp.a66)) {
334      if (A66_VSYNC_HI(a66, HLC1024())) {
335         if (A66_VSYNC_LO(m_dsp.a66, HLC1024())) {
313336            LOG((LOG_DISPL,1, " VSYNC/ (wake DVT)"));
314337            /*
315338             * The display vertical task DVT is awakened once per field,
r26245r26246
322345         }
323346      }
324347   } else {
325      if (A2_VBLANK_HI(m_dsp.a66)) {
348      if (A66_VBLANK_HI(m_dsp.a66, HLC1024())) {
326349         /**
327350          * VBLANKPULSE:
328351          * The display horizontal task DHT is awakened once at the
r26245r26246
342365          */
343366         m_dsp.curt_blocks = 0;
344367      }
345      if (A2_HBLANK_LO(a63) && A2_HBLANK_HI(m_dsp.a63)) {
368      if (A63_HBLANK_LO(a63) && A63_HBLANK_HI(m_dsp.a63)) {
346369         /* falling edge of a63 HBLANK starts unload */
347370         LOG((LOG_DISPL,1, " HBLANK\\ UNLOAD"));
348371         m_unload_time = ALTO2_DISPLAY_BITTIME(m_dsp.halfclock ? 32 : 16);
r26245r26246
368391      }
369392   }
370393
371   if (A2_SCANEND_HI(a63)) {
394   if (A63_SCANEND_HI(a63)) {
372395      LOG((LOG_DISPL,1, " SCANEND"));
373396      m_task_wakeup &= ~(1 << task_dwt);
374397   }
375398
376399   LOG((LOG_DISPL,1, "%s", (a63 & A63_HBLANK) ? " HBLANK": ""));
377400
378   if (A2_HSYNC_HI(a63)) {
379      if (A2_HSYNC_LO(m_dsp.a63)) {
401   if (A63_HSYNC_HI(a63)) {
402      if (A63_HSYNC_LO(m_dsp.a63)) {
380403         LOG((LOG_DISPL,1, " HSYNC/ (CLRBUF)"));
381404         /*
382405          * The hardware sets the buffer empty and clears the DWT block
r26245r26246
394417      } else {
395418         LOG((LOG_DISPL,1, " HSYNC"));
396419      }
397   } else if (A2_HSYNC_HI(m_dsp.a63)) {
420   } else if (A63_HSYNC_HI(m_dsp.a63)) {
398421      /*
399422       * CLRBUF' also resets the 2nd cursor task block flip flop,
400423       * which is built from two NAND gates a30c and a30d (74H00).
r26245r26246
439462void alto2_cpu_device::init_disp()
440463{
441464   memset(&m_dsp, 0, sizeof(m_dsp));
465   // allocate the 16bpp bitmap
466   m_displ_bitmap = auto_bitmap_ind16_alloc(machine(), ALTO2_DISPLAY_WIDTH, ALTO2_DISPLAY_HEIGHT);
467   LOG((LOG_DISPL,0,"   m_bitmap=%p\n", m_displ_bitmap));
442468   m_dsp.hlc = ALTO2_DISPLAY_HLC_START;
443469   m_dsp.raw_bitmap = auto_alloc_array(machine(), UINT16, ALTO2_DISPLAY_HEIGHT * ALTO2_DISPLAY_SCANLINE_WORDS);
444470   m_dsp.scanline = auto_alloc_array(machine(), UINT16*, ALTO2_DISPLAY_HEIGHT);
445471   for (int y = 0; y < ALTO2_DISPLAY_HEIGHT; y++) {
446      m_dsp.scanline[y] = m_dsp.raw_bitmap + y * ALTO2_DISPLAY_SCANLINE_WORDS;
447      memset(m_dsp.scanline[y], 0, sizeof(UINT16) * ALTO2_DISPLAY_VISIBLE_WORDS);
472      UINT16* scanline = m_dsp.raw_bitmap + y * ALTO2_DISPLAY_SCANLINE_WORDS;
473      m_dsp.scanline[y] = scanline;
474      memset(m_dsp.scanline[y], y & 1 ? 0x55 : 0xaa, sizeof(UINT16) * ALTO2_DISPLAY_VISIBLE_WORDS);
475      for (int x = 0; x < ALTO2_DISPLAY_SCANLINE_WORDS; x++)
476         update_bitmap_word(x*16, y, scanline[x]);
448477   }
449   m_dsp.scanline_dirty = auto_alloc_array(machine(), UINT8, ALTO2_DISPLAY_HEIGHT);
450   memset(m_dsp.scanline_dirty, 1, sizeof(UINT8) * ALTO2_DISPLAY_HEIGHT);
451478}
452479
453480void alto2_cpu_device::exit_disp()
454481{
455482   // nothing to do yet
456483}
457
458#define   BLACK   1
459#define   WHITE   0
460
461//! update the internal bitmap to the MAME bitmap.pix16
462void alto2_cpu_device::screen_update(bitmap_ind16 &bitmap, const rectangle &cliprect)
463{
464   for (UINT32 y = 0; y < ALTO2_DISPLAY_HEIGHT; y++) {
465      if (0 == m_dsp.scanline_dirty[y])
466         continue;
467      m_dsp.scanline_dirty[y] = 0;
468      UINT16* src = m_dsp.scanline[y];
469      UINT16* pix = &bitmap.pix16(y);
470      for (UINT32 x = 0; x < ALTO2_DISPLAY_WIDTH; x += 16) {
471         UINT16 w = *src++;
472         *pix++ = (w & 0100000) ? BLACK : WHITE;
473         *pix++ = (w & 0040000) ? BLACK : WHITE;
474         *pix++ = (w & 0020000) ? BLACK : WHITE;
475         *pix++ = (w & 0010000) ? BLACK : WHITE;
476         *pix++ = (w & 0004000) ? BLACK : WHITE;
477         *pix++ = (w & 0002000) ? BLACK : WHITE;
478         *pix++ = (w & 0001000) ? BLACK : WHITE;
479         *pix++ = (w & 0000400) ? BLACK : WHITE;
480         *pix++ = (w & 0000200) ? BLACK : WHITE;
481         *pix++ = (w & 0000100) ? BLACK : WHITE;
482         *pix++ = (w & 0000040) ? BLACK : WHITE;
483         *pix++ = (w & 0000020) ? BLACK : WHITE;
484         *pix++ = (w & 0000010) ? BLACK : WHITE;
485         *pix++ = (w & 0000004) ? BLACK : WHITE;
486         *pix++ = (w & 0000002) ? BLACK : WHITE;
487         *pix++ = (w & 0000001) ? BLACK : WHITE;
488      }
489   }
490}
branches/alto2/src/emu/cpu/alto2/alto2.h
r26245r26246
2020#define   ALTO2_TAG "alto2"
2121
2222#ifndef   ALTO2_DEBUG
23#define   ALTO2_DEBUG             0   //!< define to 1 to enable logerror() output
23#define   ALTO2_DEBUG             1   //!< define to 1 to enable logerror() output
2424#endif
2525
2626#define   USE_PRIO_F9318         0   //!< define to 1 to use the F9318 priority encoder code
r26245r26246
144144
145145#define   ALTO2_DISPLAY_SCANLINE_WORDS (ALTO2_DISPLAY_TOTAL_WIDTH/16)      //!< words per scanline
146146#define   ALTO2_DISPLAY_HEIGHT 808                              //!< number of visible scanlines per frame; 808 really, but there are some empty lines?
147#define   ALTO2_DISPLAY_WIDTH 606                                 //!< visible width of the display
147#define   ALTO2_DISPLAY_WIDTH 606                                 //!< visible width of the display; 38 words - 2 pixels
148148#define   ALTO2_DISPLAY_VISIBLE_WORDS ((ALTO2_DISPLAY_WIDTH+15)/16)      //!< visible words per scanline
149149#define   ALTO2_DISPLAY_BITCLOCK 20160000ll                        //!< display bit clock in in Hertz (20.16MHz)
150150#define   ALTO2_DISPLAY_BITTIME(n) ((n)*U64(1000000000)/ALTO2_DISPLAY_BITCLOCK)   //!< display bit time in in atto seconds (~= 49.6031ns)
r26245r26246
220220   //! driver interface to set diablo_hd_device
221221   void set_diablo(int unit, diablo_hd_device* ptr);
222222
223   //! update the internal bitmap to the MAME bitmap.pix16
224   void screen_update(bitmap_ind16 &bitmap, const rectangle &cliprect);
225
226223   //! call in for the next sector callback
227224   void next_sector(int unit);
228225
226   //! return the display bitmap
227   bitmap_ind16& display() { return *m_displ_bitmap; }
228
229229   DECLARE_ADDRESS_MAP( ucode_map, 32 );
230230   DECLARE_ADDRESS_MAP( const_map, 16 );
231231   DECLARE_ADDRESS_MAP( iomem_map, 16 );
r26245r26246
16011601      UINT32 curdata;                  //!< helper: shifted cursor data (32-bit)
16021602      UINT16 *raw_bitmap;               //!< array of words of the raw bitmap that is displayed
16031603      UINT16 **scanline;               //!< array of pointers to the scanlines
1604      UINT8 *scanline_dirty;            //!< array of flags indicating whenever the scanline contents changed
16051604   }   m_dsp;
16061605
16071606   //! horizontal line counter bit 0
r26245r26246
16561655    */
16571656   UINT8* m_disp_a38;
16581657
1658   //! output bits of PROM A38
1659   enum {
1660      A38_STOPWAKE   = (1 << 1),
1661      A38_MBEMPTY      = (1 << 3)
1662   };
1663
16591664   //! PROM a38 bit O1 is STOPWAKE' (stop DWT if bit is zero)
1660   inline int FIFO_STOPWAKE_0() { return m_disp_a38[m_dsp.fifo_rd * 16 + m_dsp.fifo_wr] & 002; }
1665   inline int FIFO_STOPWAKE_0() { return m_disp_a38[m_dsp.fifo_rd * 16 + m_dsp.fifo_wr] & A38_STOPWAKE; }
16611666
16621667   //! PROM a38 bit O3 is MBEMPTY' (FIFO is empty if bit is zero)
1663   inline int FIFO_MBEMPTY_0() { return m_disp_a38[m_dsp.fifo_rd * 16 + m_dsp.fifo_wr] & 010; }
1668   inline int FIFO_MBEMPTY_0() { return m_disp_a38[m_dsp.fifo_rd * 16 + m_dsp.fifo_wr] & A38_MBEMPTY; }
16641669
16651670   /**
16661671    * @brief emulation of PROM a63 in the display schematics page 8
r26245r26246
17021707      A63_HLCGATE   = (1 << 7)            //!< PROM a63 B7 HLCGATE signal, which enables counting the HLC
17031708   };
17041709   //!< helper to extract A3-A0 from a PROM a63 value
1705   inline UINT8 A63_NEXT(UINT8 n) { return (n >> 2) & 017; }
1710   static inline UINT8 A63_NEXT(UINT8 n) { return (n >> 2) & 017; }
17061711
17071712   //!< test the HBLANK (horizontal blanking) signal in PROM a63 being high
1708   static inline bool A2_HBLANK_HI(UINT8 a) { return (a & A63_HBLANK) ? true : false; }
1713   static inline bool A63_HBLANK_HI(UINT8 a) { return (a & A63_HBLANK) ? true : false; }
17091714   //!< test the HBLANK (horizontal blanking) signal in PROM a63 being low
1710   static inline bool A2_HBLANK_LO(UINT8 a) { return !A2_HBLANK_HI(a); }
1715   static inline bool A63_HBLANK_LO(UINT8 a) { return (a & A63_HBLANK) ? false : true; }
17111716   //!< test the HSYNC (horizontal synchonisation) signal in PROM a63 being high
1712   static inline bool A2_HSYNC_HI(UINT8 a) { return (a & A63_HSYNC) ? true : false; }
1717   static inline bool A63_HSYNC_HI(UINT8 a) { return (a & A63_HSYNC) ? true : false; }
17131718   //!< test the HSYNC (horizontal synchonisation) signal in PROM a63 being low
1714   static inline bool A2_HSYNC_LO(UINT8 a) { return !A2_HSYNC_HI(a); }
1719   static inline bool A63_HSYNC_LO(UINT8 a) { return (a & A63_HSYNC) ? false : true; }
17151720   //!< test the SCANEND (scanline end) signal in PROM a63 being high
1716   static inline bool A2_SCANEND_HI(UINT8 a) { return (a & A63_SCANEND) ? true : false; }
1721   static inline bool A63_SCANEND_HI(UINT8 a) { return (a & A63_SCANEND) ? true : false; }
17171722   //!< test the SCANEND (scanline end) signal in PROM a63 being low
1718   static inline bool A2_SCANEND_LO(UINT8 a) { return !A2_SCANEND_HI(a); }
1723   static inline bool A63_SCANEND_LO(UINT8 a) { return (a & A63_SCANEND) ? false : true; }
17191724   //!< test the HLCGATE (horz. line counter gate) signal in PROM a63 being high
1720   static inline bool A2_HLCGATE_HI(UINT8 a) { return (a & A63_HLCGATE) ? true : false; }
1725   static inline bool A63_HLCGATE_HI(UINT8 a) { return (a & A63_HLCGATE) ? true : false; }
17211726   //!< test the HLCGATE (horz. line counter gate) signal in PROM a63 being low
1722   static inline bool A2_HLCGATE_LO(UINT8 a) { return !A2_HLCGATE_HI(a); }
1727   static inline bool A63_HLCGATE_LO(UINT8 a) { return (a & A63_HLCGATE) ? false : true; }
17231728
17241729   /**
17251730    * @brief vertical blank and synch PROM
r26245r26246
17421747      A66_VBLANK_EVEN   = (1 << 3)
17431748   };
17441749
1745   //! test for the VSYNC signal (depends on "field", i.e. HLC1024)
1746   inline bool A66_VSYNC(UINT8 a) { return a & (HLC1024() ? A66_VSYNC_ODD : A66_VSYNC_EVEN) ? true : false; }
1747   //! test for the VBLANK signal (depends on "field", i.e. HLC1024)
1748   inline bool A66_VBLANK(UINT8 a) { return a & (HLC1024() ? A66_VBLANK_ODD : A66_VBLANK_EVEN) ? true : false; }
17491750   //! test the VSYNC (vertical synchronisation) signal in PROM a66 being high
1750   inline bool A2_VSYNC_HI(UINT8 a) { return A66_VSYNC(a); }
1751   static inline bool A66_VSYNC_HI(UINT8 a, int hlc1024) { return a & (hlc1024 ? A66_VSYNC_ODD : A66_VSYNC_EVEN) ? true : false; }
17511752   //! test the VSYNC (vertical synchronisation) signal in PROM a66 being low
1752   inline bool A2_VSYNC_LO(UINT8 a) { return !A66_VSYNC(a); }
1753   static inline bool A66_VSYNC_LO(UINT8 a, int hlc1024) { return a & (hlc1024 ? A66_VSYNC_ODD : A66_VSYNC_EVEN) ? false : true; }
17531754   //! test the VBLANK (vertical blanking) signal in PROM a66 being high
1754   inline bool A2_VBLANK_HI(UINT8 a) { return A66_VBLANK(a); }
1755   static inline bool A66_VBLANK_HI(UINT8 a, int hlc1024) { return a & (hlc1024 ? A66_VBLANK_ODD : A66_VBLANK_EVEN) ? true : false; }
17551756   //! test the VBLANK (vertical blanking) signal in PROM a66 being low
1756   inline bool A2_VBLANK_LO(UINT8 a) { return !A66_VBLANK(a); }
1757   static inline bool A66_VBLANK_LO(UINT8 a, int hlc1024) { return a & (hlc1024 ? A66_VBLANK_ODD : A66_VBLANK_EVEN) ? false : true; }
17571758
1758   /**
1759    * @brief unload the next word from the display FIFO and shift it to the screen
1760    */
1759   //! screen bitmap
1760   bitmap_ind16* m_displ_bitmap;
1761
1762   //! update a word in the screen bitmap
1763   void update_bitmap_word(int x, int y, UINT16 word);
1764
1765   //! unload the next word from the display FIFO and shift it to the screen
17611766   int unload_word(int x);
17621767
17631768   /**
branches/alto2/src/mess/includes/alto2.h
r26245r26246
3030
3131   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
3232
33   bitmap_ind16 m_bitmap;
33   bitmap_ind16* m_bitmap;
3434
3535   DECLARE_DRIVER_INIT(alto2);
3636
branches/alto2/src/mess/drivers/alto2.c
r26245r26246
1313UINT32 alto2_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
1414{
1515   alto2_cpu_device* cpu = downcast<alto2_cpu_device *>(m_maincpu.target());
16   cpu->screen_update(bitmap, cliprect);
16   copybitmap(bitmap, cpu->display(), 0, 0, 0, 0, cliprect);
1717   return 0;
1818}
1919
20#if   0
2120void alto2_state::screen_eof_alto2(screen_device &screen, bool state)
2221{
2322   // FIXME: what do we do here?
2423}
25#endif
2624
2725/* Input Ports */
2826
r26245r26246
253251
254252   /* video hardware */
255253   MCFG_SCREEN_ADD("screen", RASTER)
256   MCFG_SCREEN_RAW_PARAMS(XTAL_20_16MHz, 768,   0, 606, 875,   0, 808)
254   MCFG_SCREEN_RAW_PARAMS(XTAL_20_16MHz,
255                     ALTO2_DISPLAY_TOTAL_WIDTH,   0, ALTO2_DISPLAY_WIDTH,
256                     ALTO2_DISPLAY_TOTAL_HEIGHT,  0, ALTO2_DISPLAY_HEIGHT)
257257   MCFG_SCREEN_UPDATE_DRIVER(alto2_state, screen_update)
258//   MCFG_SCREEN_VBLANK_DRIVER(alto2_state, screen_eof_alto2)
258   MCFG_SCREEN_VBLANK_DRIVER(alto2_state, screen_eof_alto2)
259259
260260   MCFG_PALETTE_LENGTH(2)
261261
r26245r26246
270270   alto2_cpu_device* cpu = downcast<alto2_cpu_device *>(m_maincpu.target());
271271   cpu->set_diablo(0, downcast<diablo_hd_device *>(machine().device(DIABLO_HD_0)));
272272   cpu->set_diablo(1, downcast<diablo_hd_device *>(machine().device(DIABLO_HD_1)));
273
274#define   UNICODE_TESTING   0
275#if   UNICODE_TESTING
276   const char* filename = "docs/UnicodeData.txt";
277   int res = unicode_data_load(filename);
278   logerror("%s: unicode_data_load(\"%s\") result %d\n", filename, __FUNCTION__, res);
279   for (unicode_char uchar = 0; uchar < UNICODE_PLANESIZE; uchar++) {
280      if (UNICODE_NOT_DECIMAL != unicode_decimal(uchar))
281         logerror("%s: U+%04x (%s) is decimal %u\n", __FUNCTION__, uchar, unicode_name(uchar), unicode_decimal(uchar));
282      if (UNICODE_NOT_DIGIT != unicode_digit(uchar))
283         logerror("%s: U+%04x (%s) is digit %u\n", __FUNCTION__, uchar, unicode_name(uchar), unicode_digit(uchar));
284      if (UNICODE_NOT_NUMERIC != unicode_digit(uchar))
285         logerror("%s: U+%04x (%s) is numeric %u\n", __FUNCTION__, uchar, unicode_name(uchar), unicode_numeric(uchar));
286      if (uchar != unicode_lcase(uchar))
287         logerror("%s: U+%04x (%s) lower chase is U+%04x (%s)\n", __FUNCTION__, uchar, unicode_name(uchar), unicode_lcase(uchar), unicode_name(unicode_lcase(uchar)));
288   }
289   unicode_data_free();
290#endif
291273}
292274
293275/* Game Drivers */

Previous 199869 Revisions Next


© 1997-2024 The MAME Team