summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/isa/aga.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/isa/aga.cpp')
-rw-r--r--src/devices/bus/isa/aga.cpp152
1 files changed, 76 insertions, 76 deletions
diff --git a/src/devices/bus/isa/aga.cpp b/src/devices/bus/isa/aga.cpp
index 0499fa40022..38a1afbfae5 100644
--- a/src/devices/bus/isa/aga.cpp
+++ b/src/devices/bus/isa/aga.cpp
@@ -56,7 +56,7 @@ const device_type ISA8_AGA = &device_creator<isa8_aga_device>;
// isa8_aga_device - constructor
//-------------------------------------------------
-isa8_aga_device::isa8_aga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+isa8_aga_device::isa8_aga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t( mconfig, ISA8_AGA, "AGA", tag, owner, clock, "aga", __FILE__),
device_isa8_card_interface(mconfig, *this),
m_palette(*this, "palette"),
@@ -78,7 +78,7 @@ isa8_aga_device::isa8_aga_device(const machine_config &mconfig, const char *tag,
{
}
-isa8_aga_device::isa8_aga_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
+isa8_aga_device::isa8_aga_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_isa8_card_interface(mconfig, *this),
m_palette(*this, "palette"),
@@ -107,7 +107,7 @@ void isa8_aga_device::device_start()
m_mode = AGA_COLOR;
m_mda_chr_gen = memregion("gfx1")->base() + 0x1000;
m_cga_chr_gen = memregion("gfx1")->base();
- m_videoram = std::make_unique<UINT8[]>(0x10000);
+ m_videoram = std::make_unique<uint8_t[]>(0x10000);
set_isa_device();
m_isa->install_memory(0xb0000, 0xbffff, read8_delegate(FUNC(isa8_aga_device::pc_aga_videoram_r),this), write8_delegate(FUNC(isa8_aga_device::pc_aga_videoram_w),this));
@@ -135,7 +135,7 @@ void isa8_aga_device::device_start()
}
}
- UINT8 *gfx = &memregion("gfx1")->base()[0x8000];
+ uint8_t *gfx = &memregion("gfx1")->base()[0x8000];
/* just a plain bit pattern for graphics data generation */
for (i = 0; i < 256; i++)
gfx[i] = i;
@@ -164,7 +164,7 @@ const device_type ISA8_AGA_PC200 = &device_creator<isa8_aga_pc200_device>;
// isa8_aga_pc200_device - constructor
//-------------------------------------------------
-isa8_aga_pc200_device::isa8_aga_pc200_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+isa8_aga_pc200_device::isa8_aga_pc200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
isa8_aga_device( mconfig, ISA8_AGA_PC200, "AGA PC200", tag, owner, clock, "aga_pc200", __FILE__),
m_port8(0),
m_portd(0),
@@ -194,7 +194,7 @@ void isa8_aga_pc200_device::device_start()
m_mode = AGA_COLOR;
m_mda_chr_gen = memregion("gfx1")->base();
m_cga_chr_gen = memregion("gfx1")->base() + 0x1000;
- m_videoram = std::make_unique<UINT8[]>(0x10000);
+ m_videoram = std::make_unique<uint8_t[]>(0x10000);
set_isa_device();
m_isa->install_memory(0xb0000, 0xbffff, read8_delegate(FUNC(isa8_aga_pc200_device::pc200_videoram_r),this), write8_delegate(FUNC(isa8_aga_pc200_device::pc200_videoram_w),this));
@@ -222,7 +222,7 @@ void isa8_aga_pc200_device::device_start()
}
}
- UINT8 *gfx = &memregion("gfx1")->base()[0x8000];
+ uint8_t *gfx = &memregion("gfx1")->base()[0x8000];
/* just a plain bit pattern for graphics data generation */
for (i = 0; i < 256; i++)
gfx[i] = i;
@@ -315,19 +315,19 @@ machine_config_constructor isa8_aga_device::device_mconfig_additions() const
MC6845_UPDATE_ROW( isa8_aga_device::mda_text_inten_update_row )
{
const rgb_t *palette = m_palette->palette()->entry_list_raw();
- UINT8 *videoram = m_videoram.get();
- UINT32 *p = &bitmap.pix32(y);
- UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
+ uint8_t *videoram = m_videoram.get();
+ uint32_t *p = &bitmap.pix32(y);
+ uint16_t chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
int i;
if ( y == 0 ) logerror("mda_text_inten_update_row\n");
for ( i = 0; i < x_count; i++ ) {
- UINT16 offset = ( ( ma + i ) << 1 ) & 0x0FFF;
- UINT8 chr = videoram[ offset ];
- UINT8 attr = videoram[ offset + 1 ];
- UINT8 data = m_mda_chr_gen[ chr_base + chr * 8 ];
- UINT8 fg = ( attr & 0x08 ) ? 3 : 2;
- UINT8 bg = 0;
+ uint16_t offset = ( ( ma + i ) << 1 ) & 0x0FFF;
+ uint8_t chr = videoram[ offset ];
+ uint8_t attr = videoram[ offset + 1 ];
+ uint8_t data = m_mda_chr_gen[ chr_base + chr * 8 ];
+ uint8_t fg = ( attr & 0x08 ) ? 3 : 2;
+ uint8_t bg = 0;
if ( ( attr & ~0x88 ) == 0 ) {
data = 0x00;
@@ -375,20 +375,20 @@ MC6845_UPDATE_ROW( isa8_aga_device::mda_text_inten_update_row )
MC6845_UPDATE_ROW( isa8_aga_device::mda_text_blink_update_row )
{
- UINT8 *videoram = m_videoram.get();
+ uint8_t *videoram = m_videoram.get();
const rgb_t *palette = m_palette->palette()->entry_list_raw();
- UINT32 *p = &bitmap.pix32(y);
- UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
+ uint32_t *p = &bitmap.pix32(y);
+ uint16_t chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
int i;
if ( y == 0 ) logerror("mda_text_blink_update_row\n");
for ( i = 0; i < x_count; i++ ) {
- UINT16 offset = ( ( ma + i ) << 1 ) & 0x0FFF;
- UINT8 chr = videoram[ offset ];
- UINT8 attr = videoram[ offset + 1 ];
- UINT8 data = m_mda_chr_gen[ chr_base + chr * 8 ];
- UINT8 fg = ( attr & 0x08 ) ? 3 : 2;
- UINT8 bg = 0;
+ uint16_t offset = ( ( ma + i ) << 1 ) & 0x0FFF;
+ uint8_t chr = videoram[ offset ];
+ uint8_t attr = videoram[ offset + 1 ];
+ uint8_t data = m_mda_chr_gen[ chr_base + chr * 8 ];
+ uint8_t fg = ( attr & 0x08 ) ? 3 : 2;
+ uint8_t bg = 0;
if ( ( attr & ~0x88 ) == 0 ) {
data = 0x00;
@@ -437,19 +437,19 @@ MC6845_UPDATE_ROW( isa8_aga_device::mda_text_blink_update_row )
MC6845_UPDATE_ROW( isa8_aga_device::cga_text_inten_update_row )
{
- UINT8 *videoram = m_videoram.get();
+ uint8_t *videoram = m_videoram.get();
const rgb_t *palette = m_palette->palette()->entry_list_raw();
- UINT32 *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix32(y);
int i;
if ( y == 0 ) logerror("cga_text_inten_update_row\n");
for ( i = 0; i < x_count; i++ ) {
- UINT16 offset = ( ( ma + i ) << 1 ) & 0x3fff;
- UINT8 chr = videoram[ offset ];
- UINT8 attr = videoram[ offset +1 ];
- UINT8 data = m_cga_chr_gen[ chr * 16 + ra ];
- UINT16 fg = attr & 0x0F;
- UINT16 bg = ( attr >> 4 ) & 0x07;
+ uint16_t offset = ( ( ma + i ) << 1 ) & 0x3fff;
+ uint8_t chr = videoram[ offset ];
+ uint8_t attr = videoram[ offset +1 ];
+ uint8_t data = m_cga_chr_gen[ chr * 16 + ra ];
+ uint16_t fg = attr & 0x0F;
+ uint16_t bg = ( attr >> 4 ) & 0x07;
if ( i == cursor_x ) {
data = 0xFF;
@@ -469,17 +469,17 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_text_inten_update_row )
MC6845_UPDATE_ROW( isa8_aga_device::cga_text_inten_alt_update_row )
{
const rgb_t *palette = m_palette->palette()->entry_list_raw();
- UINT8 *videoram = m_videoram.get();
- UINT32 *p = &bitmap.pix32(y);
+ uint8_t *videoram = m_videoram.get();
+ uint32_t *p = &bitmap.pix32(y);
int i;
if ( y == 0 ) logerror("cga_text_inten_alt_update_row\n");
for ( i = 0; i < x_count; i++ ) {
- UINT16 offset = ( ( ma + i ) << 1 ) & 0x3fff;
- UINT8 chr = videoram[ offset ];
- UINT8 attr = videoram[ offset +1 ];
- UINT8 data = m_cga_chr_gen[ chr * 16 + ra ];
- UINT16 fg = attr & 0x0F;
+ uint16_t offset = ( ( ma + i ) << 1 ) & 0x3fff;
+ uint8_t chr = videoram[ offset ];
+ uint8_t attr = videoram[ offset +1 ];
+ uint8_t data = m_cga_chr_gen[ chr * 16 + ra ];
+ uint16_t fg = attr & 0x0F;
if ( i == cursor_x ) {
data = 0xFF;
@@ -499,17 +499,17 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_text_inten_alt_update_row )
MC6845_UPDATE_ROW( isa8_aga_device::cga_text_blink_update_row )
{
const rgb_t *palette = m_palette->palette()->entry_list_raw();
- UINT8 *videoram = m_videoram.get();
- UINT32 *p = &bitmap.pix32(y);
+ uint8_t *videoram = m_videoram.get();
+ uint32_t *p = &bitmap.pix32(y);
int i;
for ( i = 0; i < x_count; i++ ) {
- UINT16 offset = ( ( ma + i ) << 1 ) & 0x3fff;
- UINT8 chr = videoram[ offset ];
- UINT8 attr = videoram[ offset +1 ];
- UINT8 data = m_cga_chr_gen[ chr * 16 + ra ];
- UINT16 fg = attr & 0x0F;
- UINT16 bg = (attr >> 4) & 0x07;
+ uint16_t offset = ( ( ma + i ) << 1 ) & 0x3fff;
+ uint8_t chr = videoram[ offset ];
+ uint8_t attr = videoram[ offset +1 ];
+ uint8_t data = m_cga_chr_gen[ chr * 16 + ra ];
+ uint16_t fg = attr & 0x0F;
+ uint16_t bg = (attr >> 4) & 0x07;
if ( i == cursor_x ) {
data = 0xFF;
@@ -533,18 +533,18 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_text_blink_update_row )
MC6845_UPDATE_ROW( isa8_aga_device::cga_text_blink_alt_update_row )
{
const rgb_t *palette = m_palette->palette()->entry_list_raw();
- UINT8 *videoram = m_videoram.get();
- UINT32 *p = &bitmap.pix32(y);
+ uint8_t *videoram = m_videoram.get();
+ uint32_t *p = &bitmap.pix32(y);
int i;
if ( y == 0 ) logerror("cga_text_blink_alt_update_row\n");
for ( i = 0; i < x_count; i++ ) {
- UINT16 offset = ( ( ma + i ) << 1 ) & 0x3fff;
- UINT8 chr = videoram[ offset ];
- UINT8 attr = videoram[ offset +1 ];
- UINT8 data = m_cga_chr_gen[ chr * 16 + ra ];
- UINT16 fg = attr & 0x07;
- UINT16 bg = 0;
+ uint16_t offset = ( ( ma + i ) << 1 ) & 0x3fff;
+ uint8_t chr = videoram[ offset ];
+ uint8_t attr = videoram[ offset +1 ];
+ uint8_t data = m_cga_chr_gen[ chr * 16 + ra ];
+ uint16_t fg = attr & 0x07;
+ uint16_t bg = 0;
if ( i == cursor_x ) {
data = 0xFF;
@@ -569,14 +569,14 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_text_blink_alt_update_row )
MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_4bppl_update_row )
{
const rgb_t *palette = m_palette->palette()->entry_list_raw();
- UINT8 *videoram = m_videoram.get();
- UINT32 *p = &bitmap.pix32(y);
+ uint8_t *videoram = m_videoram.get();
+ uint32_t *p = &bitmap.pix32(y);
int i;
if ( y == 0 ) logerror("cga_gfx_4bppl_update_row\n");
for ( i = 0; i < x_count; i++ ) {
- UINT16 offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( y & 1 ) << 13 );
- UINT8 data = videoram[ offset ];
+ uint16_t offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( y & 1 ) << 13 );
+ uint8_t data = videoram[ offset ];
*p = palette[data >> 4]; p++;
*p = palette[data >> 4]; p++;
@@ -594,15 +594,15 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_4bppl_update_row )
MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_4bpph_update_row )
{
- UINT8 *videoram = m_videoram.get();
+ uint8_t *videoram = m_videoram.get();
const rgb_t *palette = m_palette->palette()->entry_list_raw();
- UINT32 *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix32(y);
int i;
if ( y == 0 ) logerror("cga_gfx_4bpph_update_row\n");
for ( i = 0; i < x_count; i++ ) {
- UINT16 offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( y & 1 ) << 13 );
- UINT8 data = videoram[ offset ];
+ uint16_t offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( y & 1 ) << 13 );
+ uint8_t data = videoram[ offset ];
*p = palette[data >> 4]; p++;
*p = palette[data >> 4]; p++;
@@ -628,15 +628,15 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_4bpph_update_row )
MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_2bpp_update_row )
{
- UINT8 *videoram = m_videoram.get();
+ uint8_t *videoram = m_videoram.get();
const rgb_t *palette = m_palette->palette()->entry_list_raw();
- UINT32 *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix32(y);
int i;
// if ( y == 0 ) logerror("cga_gfx_2bpp_update_row\n");
for ( i = 0; i < x_count; i++ ) {
- UINT16 offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( y & 1 ) << 13 );
- UINT8 data = videoram[ offset ];
+ uint16_t offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( y & 1 ) << 13 );
+ uint8_t data = videoram[ offset ];
*p = palette[m_cga_palette_lut_2bpp[ ( data >> 6 ) & 0x03 ]]; p++;
*p = palette[m_cga_palette_lut_2bpp[ ( data >> 4 ) & 0x03 ]]; p++;
@@ -654,16 +654,16 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_2bpp_update_row )
MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_1bpp_update_row )
{
- UINT8 *videoram = m_videoram.get();
+ uint8_t *videoram = m_videoram.get();
const rgb_t *palette = m_palette->palette()->entry_list_raw();
- UINT32 *p = &bitmap.pix32(y);
- UINT8 fg = m_cga_color_select & 0x0F;
+ uint32_t *p = &bitmap.pix32(y);
+ uint8_t fg = m_cga_color_select & 0x0F;
int i;
if ( y == 0 ) logerror("cga_gfx_1bpp_update_row\n");
for ( i = 0; i < x_count; i++ ) {
- UINT16 offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( ra & 1 ) << 13 );
- UINT8 data = videoram[ offset ];
+ uint16_t offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( ra & 1 ) << 13 );
+ uint8_t data = videoram[ offset ];
*p = palette[( data & 0x80 ) ? fg : 0]; p++;
*p = palette[( data & 0x40 ) ? fg : 0]; p++;
@@ -695,7 +695,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_1bpp_update_row )
READ8_MEMBER ( isa8_aga_device::pc_aga_mda_r )
{
- UINT8 data = 0xFF;
+ uint8_t data = 0xFF;
if ( m_mode == AGA_MONO ) {
switch( offset )
@@ -747,7 +747,7 @@ WRITE8_MEMBER ( isa8_aga_device::pc_aga_mda_w )
READ8_MEMBER ( isa8_aga_device::pc_aga_cga_r )
{
- UINT8 data = 0xFF;
+ uint8_t data = 0xFF;
if ( m_mode == AGA_COLOR ) {
switch( offset ) {
@@ -985,7 +985,7 @@ WRITE8_MEMBER( isa8_aga_pc200_device::pc200_cga_w )
READ8_MEMBER ( isa8_aga_pc200_device::pc200_cga_r )
{
- UINT8 result;
+ uint8_t result;
switch(offset) {
case 8: