mirror of
https://github.com/holub/mame
synced 2025-07-05 18:08:04 +03:00
mame/bfm: Implement Bell Fruit 96x8 dot matrix display for Scorpion 5. (#11805)
* New driver for BFG 96x8 dot matrix vfd * Add 96x8 dot matrix vfd to Bell Fruit Scorp5
This commit is contained in:
parent
fa39b28906
commit
a42a71d5c5
1014
src/mame/bfm/bfm_gu96x8m_k657c2.cpp
Normal file
1014
src/mame/bfm/bfm_gu96x8m_k657c2.cpp
Normal file
File diff suppressed because it is too large
Load Diff
77
src/mame/bfm/bfm_gu96x8m_k657c2.h
Normal file
77
src/mame/bfm/bfm_gu96x8m_k657c2.h
Normal file
@ -0,0 +1,77 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:David Haywood
|
||||
#ifndef MAME_MACHINE_BFG_GU96X8M_K657C2_H
|
||||
#define MAME_MACHINE_BFG_GU96X8M_K657C2_H
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
class bfm_gu96x8m_k657c2_device : public device_t
|
||||
{
|
||||
public:
|
||||
bfm_gu96x8m_k657c2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint8_t port_val)
|
||||
: bfm_gu96x8m_k657c2_device(mconfig, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
bfm_gu96x8m_k657c2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
void write_char(int data);
|
||||
virtual void update_display();
|
||||
|
||||
void shift_data(int data);
|
||||
void setdata(int data);
|
||||
void set_char(int data);
|
||||
|
||||
protected:
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual void device_post_load() override;
|
||||
|
||||
private:
|
||||
TIMER_CALLBACK_MEMBER(frame_update_callback);
|
||||
|
||||
emu_timer *m_frame_timer;
|
||||
|
||||
output_finder<1> m_vfd_background;
|
||||
output_finder<96 * 8> m_dotmatrix;
|
||||
output_finder<1> m_duty;
|
||||
|
||||
uint8_t m_cursor_pos;
|
||||
uint8_t m_pcursor_pos;
|
||||
uint8_t m_window_start;
|
||||
uint8_t m_window_end;
|
||||
uint8_t m_window_size;
|
||||
uint8_t m_shift_count;
|
||||
uint8_t m_shift_data;
|
||||
uint8_t m_brightness;
|
||||
uint8_t m_scroll_active;
|
||||
uint8_t m_display_mode;
|
||||
uint8_t m_blank_control;
|
||||
uint8_t m_extended_commands_enabled;
|
||||
uint8_t m_graphics_commands_enabled;
|
||||
uint8_t m_ascii_charset;
|
||||
uint8_t m_graphics_data[96];
|
||||
uint8_t m_graphics_start;
|
||||
uint8_t m_graphics_end;
|
||||
uint8_t m_cursor;
|
||||
uint8_t m_charset_offset[128];
|
||||
uint8_t m_chars[16];
|
||||
uint8_t m_attributes[16];
|
||||
uint8_t m_extra_data[7];
|
||||
uint8_t m_extra_data_count;
|
||||
uint8_t m_load_extra_data;
|
||||
uint8_t m_udf[16][6];
|
||||
uint8_t m_led_colour;
|
||||
uint8_t m_flash_rate;
|
||||
uint8_t m_flash_count;
|
||||
uint8_t m_flash_blank;
|
||||
uint8_t m_led_flash_rate;
|
||||
uint8_t m_led_flash_count;
|
||||
uint8_t m_led_flash_blank;
|
||||
uint8_t m_led_flash_enabled;
|
||||
};
|
||||
|
||||
DECLARE_DEVICE_TYPE(BFM_GU96X8M_K657C2, bfm_gu96x8m_k657c2_device)
|
||||
|
||||
#endif // MAME_MACHINE_BFG_GU96X8M_K657C2_H
|
@ -676,7 +676,14 @@ void sc4_adder4_state::sc4_adder4_map(address_map &map)
|
||||
|
||||
void bfm_sc45_state::bfm_sc4_reset_serial_vfd()
|
||||
{
|
||||
m_vfd0->reset();
|
||||
if (m_vfd0)
|
||||
{
|
||||
m_vfd0->reset();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_vfd1->reset();
|
||||
}
|
||||
vfd_old_clock = false;
|
||||
}
|
||||
|
||||
@ -711,10 +718,14 @@ void bfm_sc45_state::bfm_sc45_write_serial_vfd(bool cs, bool clock, bool data)
|
||||
{
|
||||
m_dm01->writedata(vfd_ser_value);
|
||||
}
|
||||
else
|
||||
else if (m_vfd0)
|
||||
{
|
||||
m_vfd0->write_char(vfd_ser_value);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_vfd1->write_char(vfd_ser_value);
|
||||
}
|
||||
}
|
||||
}
|
||||
vfd_old_clock = clock;
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "sec.h"
|
||||
#include "machine/steppers.h" // stepper motor
|
||||
|
||||
#include "bfm_gu96x8m_k657c2.h"
|
||||
#include "bfm_bda.h"
|
||||
|
||||
#include "sound/ymz280b.h"
|
||||
@ -91,6 +92,7 @@ protected:
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_duart(*this, "duart68681")
|
||||
, m_vfd0(*this, "vfd0")
|
||||
, m_vfd1(*this, "vfd1")
|
||||
, m_dm01(*this, "dm01")
|
||||
, m_ymz(*this, "ymz")
|
||||
, m_lamps(*this, "lamp%u", 0U)
|
||||
@ -101,6 +103,7 @@ protected:
|
||||
|
||||
required_device<mc68681_device> m_duart;
|
||||
optional_device<bfm_bda_device> m_vfd0;
|
||||
optional_device<bfm_gu96x8m_k657c2_device> m_vfd1;
|
||||
optional_device<bfm_dm01_device> m_dm01;
|
||||
required_device<ymz280b_device> m_ymz;
|
||||
output_finder<0x20 * 8> m_lamps;
|
||||
|
@ -145,6 +145,7 @@ PL1 = Compact Flash Slot
|
||||
#include "speaker.h"
|
||||
|
||||
#include "bfm_sc5.lh"
|
||||
#include "bfm_sc5_gu96x8.lh"
|
||||
|
||||
|
||||
|
||||
@ -351,9 +352,12 @@ void bfm_sc5_state::bfm_sc5(machine_config &config)
|
||||
m_duart->inport_cb().set(FUNC(bfm_sc5_state::bfm_sc5_duart_input_r));
|
||||
m_duart->outport_cb().set(FUNC(bfm_sc5_state::bfm_sc5_duart_output_w));
|
||||
|
||||
BFM_BDA(config, m_vfd0, 60, 0);
|
||||
// BFM_BDA(config, m_vfd0, 60, 0);
|
||||
BFM_GU96X8M_K657C2(config, m_vfd1, 60, 0);
|
||||
|
||||
config.set_default_layout(layout_bfm_sc5);
|
||||
|
||||
// config.set_default_layout(layout_bfm_sc5);
|
||||
config.set_default_layout(layout_bfm_sc5_gu96x8);
|
||||
|
||||
YMZ280B(config, m_ymz, 16000000); // ?? Mhz
|
||||
m_ymz->add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
|
1903
src/mame/layout/bfm_sc5_gu96x8.lay
Normal file
1903
src/mame/layout/bfm_sc5_gu96x8.lay
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user