New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sound and other improvements to Sega G-80 games. #7103
Conversation
…nnections. All sheet 8 sounds working.
…ently stalls on first noise source due to AFUNC interference.
* Removing devices is not a really good idea. Disabled for now. Perhaps should print some INFO.
…e is being output" This reverts commit 140a5be.
…s through speech board. Fix on/off controls.
* Moved netlist version behind an #ifdef for now, until some tricky issues can be resolved. * HLE code now runs at full fidelity, fixing Tac/Scan sounds.
* HLE shot sounds * add option to simplify SONAR sounds * updated documentation on current issues
* This is a short term solution. A NET_MODEL_OVERWRITE directive will be added to netlist later.
save_item(NAME(m_filter[index].F), index); | ||
save_item(NAME(m_filter[index].B), index); | ||
save_item(NAME(m_filter[index].z1), index); | ||
save_item(NAME(m_filter[index].z2), index); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use STRUCT_MEMBER
to help save these and avoid clutter in the debugger?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, didn't know about it and there's fairly few examples of it in the code.
{ | ||
// FIXME: Add an directive MODEL_OVERWRITE to netlist language | ||
//throw nl_exception(MF_MODEL_ALREADY_EXISTS_1(model_in)); | ||
log().info(MI_MODEL_OVERWRITE_1(model, model_in)); | ||
m_abstract.m_models[model] = def; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really a good idea? Being able to overwrite a model has potential to wreak havoc, and building things that depend on it sounds like a workaround for some other issue. I think @couriersud had it right previously in preventing models from being overwritten.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a commit from @couriersud directly as a workaround for limitations in the current model situation. I believe he intends to support a cleaner mechanism in the future.
@@ -0,0 +1,1225 @@ | |||
// license:BSD-3-Clause |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weren’t we trying to standardise on CC0 licensing for netlists? An actual description of the circuit doesn’t qualify for copyright protection. The only things that are potentially protected by copyright are the organisation/formatting of the file, and comments that contain sufficient creative work. @couriersud made an effort to get the netlists contributed by MAME developers made available under CC0 some time ago, but recently several have been added with BSD-3-Clause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you were, that's news to me, but I don't care as long as it's not GPLx.
// unconnected inputs to analog switch -- what's the right approach? | ||
NET_C(GND, U8.2, U8.5, U7.2) | ||
NET_C(GND, U15.2, U15.5, U16.2) | ||
NET_C(GND, U30.2, U30.5, U31.2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If they’re not connected to anything, they’ll look like a high-impedance path to the substrate, not a low-impedance ground connection.
u8 m_lo_mask; | ||
u8 m_hi_mask; | ||
bool m_has_psg; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why aren’t these const
? They should only be set on construction, and bad things will happen if they get modified while running.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Also the netlist and scale factor.
|
||
#pragma once | ||
|
||
#define ENABLE_NETLIST_FILTERING (0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name is far too generic for a macro that ends up in a header that could get included before other headers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. It doesn't need to be in the header anyway so I'll just move it into the cpp file.
class segag80_audio_device : public device_t, public device_mixer_interface | ||
{ | ||
public: | ||
segag80_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 lomask, u8 himask, bool haspsg, void (*netlist)(netlist::nlparse_t &), double output_scale); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This constructor should only be called by derived classes, it should not be public (and the class should possibly be called segag80_audio_device_base
to indicate that it’s an abstract base, not a concrete device implementation).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fair.
#include "includes/segag80r.h" | ||
#include "includes/segag80v.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you start needing the driver header in a device used in the driver, you’ve created circular dependencies. Is there a something you can do to avoid this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They aren't needed; probably vestigial from when I split segasnd.
for (int tgroup = 0; tgroup < 3; tgroup++) | ||
{ | ||
timer8253 &group = m_timer_group[tgroup]; | ||
for (int tchan = 0; tchan < 3; tchan++) | ||
{ | ||
timer8253::channel &channel = group.chan[tchan]; | ||
save_item(NAME(channel.holding), tgroup * 3 + tchan); | ||
save_item(NAME(channel.latchmode), tgroup * 3 + tchan); | ||
save_item(NAME(channel.latchtoggle), tgroup * 3 + tchan); | ||
save_item(NAME(channel.clockmode), tgroup * 3 + tchan); | ||
save_item(NAME(channel.bcdmode), tgroup * 3 + tchan); | ||
save_item(NAME(channel.output), tgroup * 3 + tchan); | ||
save_item(NAME(channel.lastgate), tgroup * 3 + tchan); | ||
save_item(NAME(channel.gate), tgroup * 3 + tchan); | ||
save_item(NAME(channel.subcount), tgroup * 3 + tchan); | ||
save_item(NAME(channel.count), tgroup * 3 + tchan); | ||
save_item(NAME(channel.remain), tgroup * 3 + tchan); | ||
} | ||
save_item(NAME(group.env), tgroup); | ||
save_item(NAME(group.chan_filter[0].capval), tgroup); | ||
save_item(NAME(group.chan_filter[1].capval), tgroup); | ||
save_item(NAME(group.gate1.capval), tgroup); | ||
save_item(NAME(group.gate2.capval), tgroup); | ||
save_item(NAME(group.config), tgroup); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use STRUCT_MEMBER
for saving members of structures in arrays?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
{ | ||
LOG("%s:usb_data_r = %02X\n", machine().describe_context(), (m_out_latch & 0x81) | (m_in_latch & 0x7e)); | ||
|
||
m_maincpu->adjust_icount(-200); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should guard against disabled side effects.
Sound and other improvements to Sega G-80 games: [Aaron Giles, couriersud]
SP0250 Improvements: [Aaron Giles]
Netlist additions: [Aaron Giles]
8253 PIT changes: [Aaron Giles]