Skip to content

Commit 0b02c6f

Browse files
committed
video/pc_vga_s3: bulk rename s3_vga_device -> s3trio64_vga_device
1 parent 29f3e69 commit 0b02c6f

File tree

10 files changed

+52
-52
lines changed

10 files changed

+52
-52
lines changed

src/devices/bus/isa/svga_s3.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ void isa16_svga_s3_device::device_add_mconfig(machine_config &config)
7575
{
7676
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
7777
screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480);
78-
screen.set_screen_update(m_vga, FUNC(s3_vga_device::screen_update));
78+
screen.set_screen_update(m_vga, FUNC(s3trio64_vga_device::screen_update));
7979

80-
S3_VGA(config, m_vga, 0);
80+
S3_TRIO64_VGA(config, m_vga, 0);
8181
m_vga->set_screen("screen");
8282
m_vga->set_vram_size(0x100000);
8383
}
@@ -108,7 +108,7 @@ isa16_svga_s3_device::isa16_svga_s3_device(const machine_config &mconfig, const
108108

109109
void isa16_svga_s3_device::io_isa_map(address_map &map)
110110
{
111-
map(0x00, 0x2f).m(m_vga, FUNC(s3_vga_device::io_map));
111+
map(0x00, 0x2f).m(m_vga, FUNC(s3trio64_vga_device::io_map));
112112
}
113113

114114
//-------------------------------------------------
@@ -141,7 +141,7 @@ void isa16_svga_s3_device::device_start()
141141
m_isa->install16_device(0xbee8, 0xbeeb, read16smo_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_multifunc_r)), write16smo_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_multifunc_w)));
142142
m_isa->install16_device(0xe2e8, 0xe2eb, read16sm_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_pixel_xfer_r)), write16sm_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_pixel_xfer_w)));
143143

144-
m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(s3_vga_device::mem_r)), write8sm_delegate(*m_vga, FUNC(s3_vga_device::mem_w)));
144+
m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(s3trio64_vga_device::mem_r)), write8sm_delegate(*m_vga, FUNC(s3trio64_vga_device::mem_w)));
145145
}
146146

147147
//-------------------------------------------------

src/devices/bus/isa/svga_s3.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class isa16_svga_s3_device :
3737
void io_isa_map(address_map &map);
3838

3939
private:
40-
required_device<s3_vga_device> m_vga;
40+
required_device<s3trio64_vga_device> m_vga;
4141
required_device<ibm8514a_device> m_8514;
4242
};
4343

src/devices/bus/pci/virge_pci.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@ void virge_pci_device::linear_config_changed_w(int state)
128128

129129
uint8_t virge_pci_device::vram_r(offs_t offset)
130130
{
131-
return downcast<s3_vga_device *>(m_vga.target())->mem_r(offset);
131+
return downcast<s3virge_vga_device *>(m_vga.target())->mem_r(offset);
132132
}
133133

134134
void virge_pci_device::vram_w(offs_t offset, uint8_t data)
135135
{
136-
downcast<s3_vga_device *>(m_vga.target())->mem_w(offset, data);
136+
downcast<s3virge_vga_device *>(m_vga.target())->mem_w(offset, data);
137137
}
138138

139139
void virge_pci_device::postload()

src/devices/bus/pci/vision.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ void vision864_device::device_add_mconfig(machine_config &config)
6363
{
6464
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
6565
screen.set_raw(XTAL(25'174'800), 900, 0, 640, 526, 0, 480);
66-
screen.set_screen_update("vga", FUNC(s3_vga_device::screen_update));
66+
screen.set_screen_update("vga", FUNC(s3trio64_vga_device::screen_update));
6767

68-
S3_VGA(config, m_vga, 0);
68+
S3_TRIO64_VGA(config, m_vga, 0);
6969
m_vga->set_screen("screen");
7070
// 1MB, option for 2MB
7171
m_vga->set_vram_size(2*1024*1024);
@@ -98,17 +98,17 @@ void vision864_device::device_reset()
9898

9999
void vision864_device::legacy_io_map(address_map &map)
100100
{
101-
map(0, 0x02f).m(m_vga, FUNC(s3_vga_device::io_map));
101+
map(0, 0x02f).m(m_vga, FUNC(s3trio64_vga_device::io_map));
102102
}
103103

104104
uint8_t vision864_device::vram_r(offs_t offset)
105105
{
106-
return downcast<s3_vga_device *>(m_vga.target())->mem_r(offset);
106+
return downcast<s3trio64_vga_device *>(m_vga.target())->mem_r(offset);
107107
}
108108

109109
void vision864_device::vram_w(offs_t offset, uint8_t data)
110110
{
111-
downcast<s3_vga_device *>(m_vga.target())->mem_w(offset, data);
111+
downcast<s3trio64_vga_device *>(m_vga.target())->mem_w(offset, data);
112112
}
113113

114114
void vision864_device::map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
@@ -163,9 +163,9 @@ void vision964_device::device_add_mconfig(machine_config &config)
163163
{
164164
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
165165
screen.set_raw(XTAL(25'174'800), 900, 0, 640, 526, 0, 480);
166-
screen.set_screen_update("vga", FUNC(s3_vga_device::screen_update));
166+
screen.set_screen_update("vga", FUNC(s3trio64_vga_device::screen_update));
167167

168-
S3_VGA(config, m_vga, 0);
168+
S3_TRIO64_VGA(config, m_vga, 0);
169169
m_vga->set_screen("screen");
170170
// 2MB/4MB/8MB
171171
m_vga->set_vram_size(4*1024*1024);
@@ -213,13 +213,13 @@ void vision968_device::device_add_mconfig(machine_config &config)
213213
{
214214
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
215215
screen.set_raw(XTAL(25'174'800), 900, 0, 640, 526, 0, 480);
216-
screen.set_screen_update("vga", FUNC(s3_vga_device::screen_update));
216+
screen.set_screen_update("vga", FUNC(s3trio64_vga_device::screen_update));
217217

218-
S3_VGA(config, m_vga, 0);
218+
S3_TRIO64_VGA(config, m_vga, 0);
219219
m_vga->set_screen("screen");
220220
// 2MB/4MB/8MB
221221
m_vga->set_vram_size(4*1024*1024);
222-
// m_vga->linear_config_changed().set(FUNC(s3_vga_device::linear_config_changed_w));
222+
// m_vga->linear_config_changed().set(FUNC(s3trio64_vga_device::linear_config_changed_w));
223223
}
224224

225225
void vision968_device::device_start()
@@ -252,13 +252,13 @@ void vision968_device::device_reset()
252252
// TODO: 0x0200'0000 "mirror" (really an endian relocation?)
253253
void vision968_device::lfb_map(address_map &map)
254254
{
255-
map(0x0000'0000, 0x00ff'ffff).rw(m_vga, FUNC(s3_vga_device::mem_linear_r), FUNC(s3_vga_device::mem_linear_w));
255+
map(0x0000'0000, 0x00ff'ffff).rw(m_vga, FUNC(s3trio64_vga_device::mem_linear_r), FUNC(s3trio64_vga_device::mem_linear_w));
256256
// map(0x0100'0000, 0x0100'7fff) image transfer data
257257
map(0x0100'8000, 0x0100'803f).m(FUNC(vision968_device::config_map));
258258
// map(0x0100'8100, 0x0100'816f) packed copro regs
259259
// map(0x0100'82e8, 0x0100'82e8) current ypos
260260
// map(0x0100'82ea, 0x0100'82ea) current ypos-2
261-
map(0x0100'83b0, 0x0100'83df).m(m_vga, FUNC(s3_vga_device::io_map));
261+
map(0x0100'83b0, 0x0100'83df).m(m_vga, FUNC(s3trio64_vga_device::io_map));
262262
// map(0x0100'8502, 0x0100'8502) (VGA $0102 alias)
263263
// map(0x0100'8504, 0x0100'8504) (VGA $42e8 alias)
264264
// map(0x0100'8508, 0x0100'8508) (VGA $46e8 alias)

src/devices/bus/pci/vision.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class vision864_device : public pci_card_device
3131
virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
3232
uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override;
3333

34-
required_device<s3_vga_device> m_vga;
34+
required_device<s3trio64_vga_device> m_vga;
3535
required_memory_region m_bios;
3636
private:
3737
u8 vram_r(offs_t offset);

src/devices/video/pc_vga_s3.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,27 @@ enum
2222
};
2323

2424

25-
DEFINE_DEVICE_TYPE(S3_VGA, s3_vga_device, "s3_vga", "S3 Graphics VGA")
25+
DEFINE_DEVICE_TYPE(S3_TRIO64_VGA, s3trio64_vga_device, "s3_vga", "S3 86c764 Trio64 VGA i/f")
2626

27-
s3_vga_device::s3_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
28-
: s3_vga_device(mconfig, S3_VGA, tag, owner, clock)
27+
s3trio64_vga_device::s3trio64_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
28+
: s3trio64_vga_device(mconfig, S3_TRIO64_VGA, tag, owner, clock)
2929
{
3030

3131
}
3232

33-
s3_vga_device::s3_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
33+
s3trio64_vga_device::s3trio64_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
3434
: svga_device(mconfig, type, tag, owner, clock)
3535
{
36-
m_crtc_space_config = address_space_config("crtc_regs", ENDIANNESS_LITTLE, 8, 8, 0, address_map_constructor(FUNC(s3_vga_device::crtc_map), this));
37-
m_seq_space_config = address_space_config("sequencer_regs", ENDIANNESS_LITTLE, 8, 8, 0, address_map_constructor(FUNC(s3_vga_device::sequencer_map), this));
36+
m_crtc_space_config = address_space_config("crtc_regs", ENDIANNESS_LITTLE, 8, 8, 0, address_map_constructor(FUNC(s3trio64_vga_device::crtc_map), this));
37+
m_seq_space_config = address_space_config("sequencer_regs", ENDIANNESS_LITTLE, 8, 8, 0, address_map_constructor(FUNC(s3trio64_vga_device::sequencer_map), this));
3838
}
3939

40-
void s3_vga_device::device_add_mconfig(machine_config &config)
40+
void s3trio64_vga_device::device_add_mconfig(machine_config &config)
4141
{
4242
IBM8514A(config, "8514a", 0).set_vga_owner();
4343
}
4444

45-
TIMER_CALLBACK_MEMBER(s3_vga_device::vblank_timer_cb)
45+
TIMER_CALLBACK_MEMBER(s3trio64_vga_device::vblank_timer_cb)
4646
{
4747
// not sure if this is correct, but XF86_S3 seems to expect the viewport scrolling to be faster
4848
if(s3.memory_config & 0x08)
@@ -53,7 +53,7 @@ TIMER_CALLBACK_MEMBER(s3_vga_device::vblank_timer_cb)
5353
m_vblank_timer->adjust( screen().time_until_pos(vga.crtc.vert_blank_start + vga.crtc.vert_blank_end) );
5454
}
5555

56-
void s3_vga_device::device_start()
56+
void s3trio64_vga_device::device_start()
5757
{
5858
svga_device::device_start();
5959
memset(&s3, 0, sizeof(s3));
@@ -73,7 +73,7 @@ void s3_vga_device::device_start()
7373
// s3.id_cr30 = 0xc1;
7474
}
7575

76-
void s3_vga_device::device_reset()
76+
void s3trio64_vga_device::device_reset()
7777
{
7878
vga_device::device_reset();
7979
// Power-on strapping bits. Sampled at reset, but can be modified later.
@@ -84,21 +84,21 @@ void s3_vga_device::device_reset()
8484
s3.sr11 = 0x41;
8585
}
8686

87-
u16 s3_vga_device::line_compare_mask()
87+
u16 s3trio64_vga_device::line_compare_mask()
8888
{
8989
// TODO: pinpoint condition
9090
return svga.rgb8_en ? 0x7ff : 0x3ff;
9191
}
9292

93-
uint16_t s3_vga_device::offset()
93+
uint16_t s3trio64_vga_device::offset()
9494
{
9595
//popmessage("Offset: %04x %s %s %s",vga.crtc.offset,vga.crtc.dw?"DW":"--",vga.crtc.word_mode?"BYTE":"WORD",(s3.memory_config & 0x08)?"31":"--");
9696
if(s3.memory_config & 0x08)
9797
return vga.crtc.offset << 3;
9898
return vga_device::offset();
9999
}
100100

101-
void s3_vga_device::s3_define_video_mode()
101+
void s3trio64_vga_device::s3_define_video_mode()
102102
{
103103
int divisor = 1;
104104
int xtal = ((vga.miscellaneous_output & 0xc) ? XTAL(28'636'363) : XTAL(25'174'800)).value();
@@ -151,7 +151,7 @@ void s3_vga_device::s3_define_video_mode()
151151
recompute_params_clock(divisor, xtal);
152152
}
153153

154-
void s3_vga_device::refresh_pitch_offset()
154+
void s3trio64_vga_device::refresh_pitch_offset()
155155
{
156156
// bit 2 = bit 8 of offset register, but only if bits 4-5 of CR51 are 00h.
157157
vga.crtc.offset &= 0xff;
@@ -161,7 +161,7 @@ void s3_vga_device::refresh_pitch_offset()
161161
vga.crtc.offset |= (s3.cr51 & 0x30) << 4;
162162
}
163163

164-
void s3_vga_device::crtc_map(address_map &map)
164+
void s3trio64_vga_device::crtc_map(address_map &map)
165165
{
166166
svga_device::crtc_map(map);
167167
map(0x2d, 0x2d).lr8(
@@ -665,7 +665,7 @@ bit 0 Vertical Total bit 10. Bit 10 of the Vertical Total register (3d4h
665665
);
666666
}
667667

668-
void s3_vga_device::sequencer_map(address_map &map)
668+
void s3trio64_vga_device::sequencer_map(address_map &map)
669669
{
670670
svga_device::sequencer_map(map);
671671
// TODO: SR8 (unlocks SRD)
@@ -721,7 +721,7 @@ void s3_vga_device::sequencer_map(address_map &map)
721721
);
722722
}
723723

724-
uint8_t s3_vga_device::mem_r(offs_t offset)
724+
uint8_t s3trio64_vga_device::mem_r(offs_t offset)
725725
{
726726
if (svga.rgb8_en || svga.rgb15_en || svga.rgb16_en || svga.rgb32_en)
727727
{
@@ -755,7 +755,7 @@ uint8_t s3_vga_device::mem_r(offs_t offset)
755755
return 0xff;
756756
}
757757

758-
void s3_vga_device::mem_w(offs_t offset, uint8_t data)
758+
void s3trio64_vga_device::mem_w(offs_t offset, uint8_t data)
759759
{
760760
ibm8514a_device* dev = get_8514();
761761
// bit 4 of CR53 enables memory-mapped I/O
@@ -1025,7 +1025,7 @@ void s3_vga_device::mem_w(offs_t offset, uint8_t data)
10251025
}
10261026

10271027

1028-
uint32_t s3_vga_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
1028+
uint32_t s3trio64_vga_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
10291029
{
10301030
svga_device::screen_update(screen, bitmap, cliprect);
10311031

src/devices/video/pc_vga_s3.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
#include "screen.h"
1212

1313

14-
class s3_vga_device : public svga_device
14+
class s3trio64_vga_device : public svga_device
1515
{
1616
public:
1717
// construction/destruction
18-
s3_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
18+
s3trio64_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
1919

2020
virtual uint8_t mem_r(offs_t offset) override;
2121
virtual void mem_w(offs_t offset, uint8_t data) override;
@@ -27,7 +27,7 @@ class s3_vga_device : public svga_device
2727
ibm8514a_device* get_8514() { return m_8514; }
2828

2929
protected:
30-
s3_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
30+
s3trio64_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
3131

3232
// device-level overrides
3333
virtual void device_start() override;
@@ -98,6 +98,6 @@ class s3_vga_device : public svga_device
9898
};
9999

100100
// device type definition
101-
DECLARE_DEVICE_TYPE(S3_VGA, s3_vga_device)
101+
DECLARE_DEVICE_TYPE(S3_TRIO64_VGA, s3trio64_vga_device)
102102

103103
#endif // MAME_VIDEO_PC_VGA_S3_H

src/devices/video/s3virge.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ s3virge_vga_device::s3virge_vga_device(const machine_config &mconfig, const char
5959
}
6060

6161
s3virge_vga_device::s3virge_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
62-
: s3_vga_device(mconfig, type, tag, owner, clock)
62+
: s3trio64_vga_device(mconfig, type, tag, owner, clock)
6363
, m_linear_config_changed_cb(*this)
6464
{
6565
}
@@ -154,7 +154,7 @@ void s3virgedx_rev1_vga_device::device_start()
154154

155155
void s3virge_vga_device::device_reset()
156156
{
157-
s3_vga_device::device_reset();
157+
s3trio64_vga_device::device_reset();
158158
// Power-on strapping bits. Sampled at reset, but can be modified later.
159159
// These are just assumed defaults.
160160
s3.strapping = 0x000f0912;
@@ -191,12 +191,12 @@ uint16_t s3virge_vga_device::offset()
191191
// this breaks VBETest, which detects these VESA modes as 32bpp.
192192
if(svga.rgb24_en)
193193
return vga.crtc.offset * 6;
194-
return s3_vga_device::offset();
194+
return s3trio64_vga_device::offset();
195195
}
196196

197197
void s3virge_vga_device::crtc_map(address_map &map)
198198
{
199-
s3_vga_device::crtc_map(map);
199+
s3trio64_vga_device::crtc_map(map);
200200
// TODO: verify these overrides
201201
map(0x3a, 0x3a).lw8(
202202
NAME([this] (offs_t offset, u8 data) {

src/devices/video/s3virge.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
// ======================> s3virge_vga_device
1818

19-
class s3virge_vga_device : public s3_vga_device
19+
class s3virge_vga_device : public s3trio64_vga_device
2020
{
2121
public:
2222
// construction/destruction

src/mame/misc/savquest.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class savquest_state : public pcat_base_state
112112

113113
std::unique_ptr<uint8_t[]> m_smram;
114114

115-
required_device<s3_vga_device> m_vga;
115+
required_device<s3trio64_vga_device> m_vga;
116116
required_device<voodoo_2_device> m_voodoo;
117117

118118
int m_haspind = 0;
@@ -788,7 +788,7 @@ void savquest_state::savquest_io(address_map &map)
788788
map(0x0170, 0x0177).rw("ide2", FUNC(ide_controller_32_device::cs0_r), FUNC(ide_controller_32_device::cs0_w));
789789
map(0x01f0, 0x01f7).rw("ide", FUNC(ide_controller_32_device::cs0_r), FUNC(ide_controller_32_device::cs0_w));
790790
map(0x0378, 0x037b).rw(FUNC(savquest_state::parallel_port_r), FUNC(savquest_state::parallel_port_w));
791-
map(0x03b0, 0x03df).m("vga", FUNC(s3_vga_device::io_map));
791+
map(0x03b0, 0x03df).m("vga", FUNC(s3trio64_vga_device::io_map));
792792
map(0x0370, 0x0377).rw("ide2", FUNC(ide_controller_32_device::cs1_r), FUNC(ide_controller_32_device::cs1_w));
793793
map(0x03f0, 0x03f7).rw("ide", FUNC(ide_controller_32_device::cs1_r), FUNC(ide_controller_32_device::cs1_w));
794794

@@ -871,9 +871,9 @@ void savquest_state::savquest(machine_config &config)
871871
// TODO: map to ISA bus, make sure that the Voodoo can override s3 in screen update
872872
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
873873
screen.set_raw(25.1748_MHz_XTAL, 900, 0, 640, 526, 0, 480);
874-
screen.set_screen_update("vga", FUNC(s3_vga_device::screen_update));
874+
screen.set_screen_update("vga", FUNC(s3trio64_vga_device::screen_update));
875875

876-
s3_vga_device &vga(S3_VGA(config, "vga", 0));
876+
s3trio64_vga_device &vga(S3_TRIO64_VGA(config, "vga", 0));
877877
vga.set_screen("screen");
878878
vga.set_vram_size(0x100000);
879879

0 commit comments

Comments
 (0)