summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/nes.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rearrange source to match project structure (done using the script in ↵ Vas Crabb2022-06-271-235/+0
| | | | src/tools).
* bus/nes: Added support for multicart board DS-9-27. (#9525) 0kmg2022-04-061-0/+1
| | | | | New working software list additions (nes.xml) ----------------------------------- Gàishì 190 in 1 [Consolethinks]
* bus/nes: Correct and consolidate Golden Game multicart emulation. (#9511) 0kmg2022-04-041-1/+0
| | | | | | | | | | | New working software list additions (nes.xml) ----------------------------------- 1500 in 1 [MLX] Golden Game: 210 in 1 [kmg] Software list items promoted to working (nes.xml) --------------------------------------- Golden Game: 150 in 1 [kmg] Golden Game: 260 in 1 [kmg]
* Various NES and friends cleanups. (#9312) 0kmg2022-02-211-1/+1
| | | | | | | * nes.h: Removed ancient unused defines and variables. * playch10.cpp: Removed unused shared pointer. * vsnes.cpp: Changed BaseBall in titles to Baseball. * bus/nes: Cleaned up various device_type comparisons and set some consts const. * sound/nes_defs.h: Fixed a DPCM table entry that was off by one.
* bus/nes: Added support for KC885 and JY-302 boards. (#9191) 0kmg2022-01-211-0/+1
| | | | | | | | New working software list additions (nes.xml) ----------------------------------- Heros 8 in 1 (JY-207) [MLX] Super 8 in 1 (JY-301) [MLX] King 8 in 1 (JY-302) [MLX] Super 19 in 1 (VIP19) [NewRisingSun]
* machine/nes.cpp: Accomodate games that don't initialize RAM. (#8986) 0kmg2021-12-151-0/+9
| | | | | Software list items promoted to working (nes.xml) --------------------------------------- Minna no Taabou no Nakayoshi Daisakusen (Japan) [kmg]
* bus/nes_ctrl: Work on Famicom joypads + more separation of EXP port. (#8956) 0kmg2021-12-111-7/+2
| | | | | | | | | | | | | | * bus/nes_ctrl: Work on Famicom joypads + more separation of EXP port. - Enforced proper strobe behavior on joypads. Added helper function to controller interface for common pattern. - Added proper expansion port version of joypad. - Streamlined pachinko controller by making it an expansion joypad subclass. Moreover, ball launch lever now works correctly! - Added missing battery-backed WRAM to Pachio-kun 5, game runs now. - Simplified arcade stick a bit, now also a subclass of the expansion joypad. - Rewrote Hori Twin and 4 Players adapters. The latter's 4P mode protocol now works. In theory this supports six players simultaneously, though all known games using it have duplicate controls for P1 and P2. machine/nes.cpp: Removed hack that shifted bit 0 reads to support controller port joypads on expansion port. There shouldn't be any expansion port devices left that write to bit 0. * Fix missing battery-backed WRAM for Royal Blood and Vegas Connection, while we're at it.
* bus/nes_ctrl: Disentangled Famicom joypad 2 from expansion port code. (#8949) 0kmg2021-12-081-13/+4
| | | | | | | - Removed read_exp call from fcpad2. The FC expansion port is not tied to the relevant line at all. - Replaced with read_bit2 in the control port interface for the same purpose. - Separated JOYPAD inputs from MIC. The microphone shouldn't be mixed with button inputs' shift register. machine/nes.cpp: Also removed read_exp calls on FC control ports. Other than the microphone on fcpad2 nothing used these (nor should they as the only line in common is $4017 bit 0, which in general is never used by the expansion port).
* bus/nes: Added support for K-3033 and 970670C type multicart. (#8665) 0kmg2021-10-061-0/+1
| | | | | | | New working software list additions (nes.xml) ----------------------------------- 2 in 1 (NT-811) [Consolethinks] 4 in 1 1999 [Consolethinks] 35 in 1 (K-3033) [anonymous]
* bus/nes: Added support for original Dongdongnao II cartridge. (#8628) 0kmg2021-09-301-0/+1
| | | | | | | * Also set correct board type for Yeong-eo Pyramid, fixing title screen graphics, and identified it as a (licensed) clone of Dongdongnao II. New working software list additions (nes.xml) ----------------------------------- Dòngdòngnǎo II: Guózhōng Yīngwén (I) (Taiwan) [MLX]
* bus/nes: Added support for Y2K 420 in 1. (#8622) 0kmg2021-09-281-0/+1
| | | | | New working software list additions (nes.xml) ----------------------------------- Y2K 420 in 1 [BootGod]
* bus/nes: Several small separate fixes. (#8580) 0kmg2021-09-211-1/+0
| | | | | | | | | | * Fixed empty menu in Supervision 16 in 1. * Fixed softlist loading of GB 63 in 1 and hooked it up with a compatible board type. Removed old partially-working code. * Removed a spurious line in PCB loader that set WRAM in SMB2J bootlegs--they don't have any! Software list items promoted to working (nes.xml) --------------------------------------- Ghostbusters 63 in 1 Super 128k - 16 in 1
* bus/nes: Added support for Super Russian Roulette. 0kmg2021-09-181-0/+1
| | | | | | New working software list additions (nes.xml) ----------------------------------- Super Russian Roulette [re4mat]
* bus/nes: Added support for a 4 in 1 multicart. (#8549) 0kmg2021-09-071-0/+1
| | | | | New working software list additions (nes.xml) ----------------------------------- 4 in 1 HQ [famiac]
* bus/nes: Miscellaneous minor multicart fixes, mostly. (#8291) 0kmg2021-08-131-11/+56
| | | | | | | | | | | | | | | | * pengseal: Fixed company and title screen graphics. * dongdong: Added device for this unique board (should have been marked not working.) * mc_sg20: Fixed graphics fixed in all games, no longer randomly resets to Bomberman mid-game in Hogan's Alley. * mc_190: Refactored code - this is the same as mc_sg20 with a mirroring bit. * mc_1994: Corrected banking code - all games work now. * mc_4ck1: Runs now, although Contra has some incorrect tiling issues; added jumper setting. * mc_6m23: Fixed graphics in all games (light gun still not working due to non-bus issues). * magicdrg: Fixed background tiling. Software list items promoted to working --------------------------------------- 1994 Super HIK 14 in 1 (G-136) 4 in 1 1993 (CK-001) 4 in 1 1993 (CK-001, Alt)
* bus/nes: Added support for YUNG-08 SMB2 FDS conversions. (#8366) 0kmg2021-07-291-1/+1
| | | | | | Software list items promoted to working (nes.xml) --------------------------------------- Super Mario Bros. 2 (YUNG-08) Super Mario Bros. 2 (YUNG-08, no protection)
* bus/nes: Fixed non-working Whirlwind LE10 SMB2 FDS conversion. (#8361) 0kmg2021-07-271-2/+2
| | | | | Software list items promoted to working (nes.xml) --------------------------------------- Super Mario Bros. 2 (LE10)
* bus/nes: Added support for a couple Chinese unlicensed carts. (#8195) 0kmg2021-07-131-1/+1
| | | | | | | Software list items promoted to working (nes.xml) --------------------------------------- Fāngkuài Zǒngdòngyuán (China) Korean Igo (Korea) Ninja Ryukenden (China)
* -bus/nes: Added support for two more FDS bootlegs, fixed another. (#8247) 0kmg2021-07-091-1/+1
| | | | | | | | | | | * Added boards for Palthena no Kagami (Kid Icarus) and Lucky Rabbit, (Roger Rabbit) FDS bootlegs. * Fixed background tiles in fuunsfds, it has hardwired vertical mirroring. -nes.xml: Marked tobidfds as not supported - it crashes on start. New working software list additions (nes.xml) ----------------------------------- Hikari Shinwa - Palthena no Kagami (Asia, FDS conversion) [famiac] Lucky Rabbit (Asia, Roger Rabbit FDS conversion) [famiac]
* bus/nes: add support for 2 more FDS conversions (#8238) 0kmg2021-06-301-1/+1
| | | | | | | | | | * add KS7010 PCB device unique to akumafds * add KS7030 PCB device unique to dokidokia * do some sorting and tidying of Kaiser board tags New working software list additions ----------------------------------- Akumajou Dracula (Asia, FDS conversion) [Kevtris] Doki Doki Panic (Asia, FDS conversion, alt PCB) [famiac]
* bus/nes: add support for Gyruss FDS conversion (#8234) 0kmg2021-06-291-1/+1
|
* add mapper 29 and preliminary mapper 30 support (#8225) 0kmg2021-06-251-1/+1
| | | | | | | | | | | | New working software list additions ----------------------------------- 2A03Puritans [rainwarrior] E.T. [KHAN] Glider [anonymous] * mapper 29: support should be complete but there are few if any other homebrew roms to test against * mapper 30: only supports the most basic board that doesn't use flashable memory - tested on a dozen or so roms, all working * add a game each for mappers 29 (Glider), 30 (E.T.), and 31 (2A03Puritans) so there is something in the software lists to actually test against. Glider is discontinued by manufacture, the other two are freely available from their authors. * various naming clean ups, like BTL- prefixes for things that are not bootlegs
* emumem: Simplify memory management. [O. Galibert] Olivier Galibert2020-11-021-4/+2
| | | | | | | | | | | | | | | | | | | | API impact: - install_ram/rom/writeonly now requires a non-null pointer. If you want automatically managed ram, add it to a memory map, not in machine_start - install_*_bank now requires a memory_bank *, not a string - one can create memory banks outside of memory maps with memory_bank_creator - one can create memory shares outside of memory maps with memory_share_creator Memory maps impact: - ram ranges with overlapping addresses are not shared anymore. Use .share() - ram ranges touching each other are not merged anymore. Stay in your range Extra note: - there is no need to create a bank just to dynamically map some memory/rom. Just use install_rom/ram/writeonly
* drivers starting with m, n and o: removed read* and write* macros (nw) Ivan Vangelista2020-06-121-9/+9
|
* Make devdelegate more like devcb for configuration. This is a Vas Crabb2019-10-261-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fundamental change to show device delegates are configured. Device delegates are now aware of the current device during configuration and will resolve string tags relative to it. This means that device delegates need a device to be supplied on construction so they can find the machine configuration object. There's a one-dimensional array helper to make it easier to construct arrays of device delegates with the same owner. (I didn't make an n-dimensional one because I didn't hit a use case, but it would be a simple addition.) There's no more bind_relative_to member - just call resolve() like you would for a devcb. There's also no need to cast nullptr when creating a late bind device delegate. The flip side is that for an overloaded or non-capturing lambda you'll need to cast to the desired type. There is one less conditional branch in the hot path for calls for delegates bound to a function pointer of member function pointer. This comes at the cost of one additional unconditional branch in the hot path for calls to delegates bound to functoids (lambdas, functions that don't take an object reference, other callable objects). This applies to all delegates, not just device delegates. Address spaces will now print an error message if a late bind error is encountered while installing a handler. This will give the range and address range, hopefully making it easier to guess which memory map is faulty. For the simple case of allowing a device_delegate member to be configured, use a member like this: template <typename... T> void set_foo(T &&...args) { m_foo_cb.set(std::forward<T>(args)...); } For a case where different delegates need to be used depending on the function signature, see src/emu/screen.h (the screen update function setters). Device delegates now take a target specification and function pointer. The target may be: * Target omitted, implying the current device being configured. This can only be used during configuration. It will work as long as the current device is not removed/replaced. * A tag string relative to the current device being configured. This can only be used during configuration. It will not be callable until .resolve() is called. It will work as long as the current device is not removed/replaced. * A device finder (required_device/optional_device). The delegate will late bind to the current target of the device finder. It will not be callable until .resolve() is called. It will work properly if the target device is replaced, as long as the device finder's base object isn't removed/replaced. * A reference to an object. It will be callable immediately. It will work as long as the target object is not removed/replaced. The target types and restrictions are pretty similar to what you already have on object finders and devcb, so it shouldn't cause any surprises. Note that dereferencing a device finder will changes the effect. To illustrate this: ... required_device<some_device> m_dev; ... m_dev(*this, "dev") ... // will late bind to "dev" relative to *this // will work if "dev" hasn't been created yet or is replaced later // won't work if *this is removed/replaced // won't be callable until resolve() is called cb1.set(m_dev, FUNC(some_device::w)); ... // will bind to current target of m_dev // will not work if m_dev is not resolved // will not work if "dev" is replaced later // will be callable immediately cb2.set(*m_dev, FUNC(some_device::w)); ... The order of the target and name has been reversed for functoids (lambdas and other callable objects). This allows the NAME macro to be used on lambdas and functoids. For example: foo.set_something(NAME([this] (u8 data) { m_something = data; })); I realise the diagnostic messages get ugly if you use NAME on a large lambda. You can still give a literal name, you just have to place it after the lambda rather than before. This is uglier, but it's intentional. I'm trying to drive developers away from a certain style. While it's nice that you can put half the driver code in the memory map, it detracts from readability. It's hard to visualise the memory range mappings if the memory map functions are punctuated by large lambdas. There's also slightly higher overhead for calling a delegate bound to a functoid. If the code is prettier for trivial lambdas but uglier for non-trivial lambdas in address maps, it will hopefully steer people away from putting non-trivial lambdas in memory maps. There were some devices that were converted from using plain delegates without adding bind_relative_to calls. I fixed some of them (e.g. LaserDisc) but I probably missed some. These will likely crash on unresolved delegate calls. There are some devices that reset delegates at configuration complete or start time, preventing them from being set up during configuration (e.g. src/devices/video/ppu2c0x.cpp and src/devices/machine/68307.cpp). This goes against the design principles of how device delegates should be used, but I didn't change them because I don't trust myself to find all the places they're used. I've definitely broken some stuff with this (I know about asterix), so report issues and bear with me until I get it all fixed.
* nes: Replace VDP bitmap access with screen().pixel() for lightgun emulation ↵ enikland22019-03-301-13/+0
| | | | (#4665)
* (nw) Clean up the mess on master Vas Crabb2019-03-261-11/+11
| | | | | | | | | | | | | This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
* Revert "conflict resolution (nw)" andreasnaive2019-03-251-11/+11
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* bus/nes, vrc6: Simplify read/write handlers; misc. minor changes (nw) AJR2019-02-251-11/+11
| | | | | - Hide m_open_bus behind accessor - De-virtualize a few methods without actual overrides
* Allow passing std::unique_ptr<TYPE> directly to save_pointer and remove ↵ AJR2018-06-241-1/+1
| | | | now-superfluous .get() in many drivers/devices (nw)
* n64, pc1251, model2, midyunit, konamigx, k054338: Remove machine().device ↵ mooglyguy2018-05-281-1/+1
| | | | lookups, nw
* Removed DRIVER_INIT-related macros, made driver init entry in GAME/COMP/CONS ↵ MooglyGuy2018-05-131-1/+1
| | | | | | | | | | | | explicit. (#3565) * -Removed DRIVER_INIT macros in favor of explicitly-named member functions, nw * -Removed DRIVER_INIT_related macros. Made init_ prefix on driver initializers explicit. Renamed init_0 to empty_init. Fixed up GAME/COMP/CONS macro spacing. [Ryan Holtz] * Missed some files, nw * Fix compile, (nw)
* ppu2c0x family: Make palette internal to device AJR2018-05-061-6/+3
|
* basic VT03 support David Haywood2017-05-231-3/+3
|
* Move static data out of devices into the device types. This is a ↵ Vas Crabb2017-05-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | significant change, so please pay attention. The core changes are: * Short name, full name and source file are no longer members of device_t, they are part of the device type * MACHINE_COFIG_START no longer needs a driver class * MACHINE_CONFIG_DERIVED_CLASS is no longer necessary * Specify the state class you want in the GAME/COMP/CONS line * The compiler will work out the base class where the driver init member is declared * There is one static device type object per driver rather than one per machine configuration Use DECLARE_DEVICE_TYPE or DECLARE_DEVICE_TYPE_NS to declare device type. * DECLARE_DEVICE_TYPE forward-declares teh device type and class, and declares extern object finders. * DECLARE_DEVICE_TYPE_NS is for devices classes in namespaces - it doesn't forward-declare the device type. Use DEFINE_DEVICE_TYPE or DEFINE_DEVICE_TYPE_NS to define device types. * These macros declare storage for the static data, and instantiate the device type and device finder templates. The rest of the changes are mostly just moving stuff out of headers that shouldn't be there, renaming stuff for consistency, and scoping stuff down where appropriate. Things I've actually messed with substantially: * More descriptive names for a lot of devices * Untangled the fantasy sound from the driver state, which necessitates breaking up sound/flip writes * Changed DECO BSMT2000 ready callback into a device delegate * Untangled Microprose 3D noise from driver state * Used object finders for CoCo multipak, KC85 D002, and Irem sound subdevices * Started to get TI-99 stuff out of the TI-990 directory and arrange bus devices properly * Started to break out common parts of Samsung ARM SoC devices * Turned some of FM, SID, SCSP DSP, EPIC12 and Voodoo cores into something resmbling C++ * Tried to make Z180 table allocation/setup a bit safer * Converted generic keyboard/terminal to not use WRITE8 - space/offset aren't relevant * Dynamically allocate generic terminal buffer so derived devices (e.g. teleprinter) can specify size * Imporved encapsulation of Z80DART channels * Refactored the SPC7110 bit table generator loop to make it more readable * Added wrappers for SNES PPU operations so members can be made protected * Factored out some boilerplate for YM chips with PSG * toaplan2 gfx * stic/intv resolution * Video System video * Out Run/Y-board sprite alignment * GIC video hookup * Amstrad CPC ROM box members * IQ151 ROM cart region * MSX cart IRQ callback resolution time * SMS passthrough control devices starting subslots I've smoke-tested several drivers, but I've probably missed something. Things I've missed will likely blow up spectacularly with failure to bind errors and the like. Let me know if there's more subtle breakage (could have happened in FM or Voodoo). And can everyone please, please try to keep stuff clean. In particular, please stop polluting the global namespace. Keep things out of headers that don't need to be there, and use things that can be scoped down rather than macros. It feels like an uphill battle trying to get this stuff under control while more of it's added.
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-7/+7
| | | | | Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
* checkpoint. nw. etabeta782016-06-271-2/+2
|
* removed auto_bitmap_ind*_alloc and auto_bitmap_rgb32_alloc and replaced with ↵ Miodrag Milanovic2015-12-171-3/+3
| | | | | | | std::unique_ptr (nw) auto_alloc_array to unique_ptr Added make_unique_clear
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-0/+208