- --
Viewing Issue Advanced Details
[ Jump to Notes ]
ID | Category [?] | Severity [?] | Reproducibility | Date Submitted | Last Update |
---|---|---|---|---|---|
06165 | Core | Minor | Always | Mar 26, 2016, 20:15 | Mar 27, 2016, 18:28 |
Tester | AmatCoder | View Status | Public | Platform | MESS (Official Binary) |
Assigned To | Resolution | Open | OS | Linux | |
Status [?] | Confirmed | Driver | |||
Version | 0.171 | Fixed in Version | Build | 64-bit | |
Fixed in Git Commit | Github Pull Request # | ||||
Summary | 06165: lynx: Mess fails to load carts when pointing to the full path | ||||
Description |
I get this error when I try Atari Lynx system: sdlmame lynx -cart "/home/user/Downloads/roms/Pac-Land (USA, Europe).zip" lynx.bin ROM NEEDS REDUMP WARNING: the machine might not run correctly. FATALERROR: Device Generic ROM Socket / RAM Socket / Cartridge Slot load failed: Unspecified error It works fine if I launch from software list. It works a few versions ago, so it seems a regression. |
||||
Steps To Reproduce | |||||
Additional Information | |||||
Github Commit | |||||
Flags | |||||
Regression Version | |||||
Affected Sets / Systems | lynx | ||||
Attached Files
|
lynx.patch (1,621 bytes) Mar 27, 2016, 18:24 Uploaded by AmatCoder [Show Content] [Hide Content]--- a/src/mame/machine/lynx.cpp 2016-03-27 20:14:54.167021725 +0200 +++ b/src/mame/machine/lynx.cpp 2016-03-27 20:13:43.640353507 +0200 @@ -2048,10 +2048,8 @@ { logerror("This image is probably a Quickload image with .lnx extension\n"); logerror("Try to load it with -quickload\n"); + return IMAGE_VERIFY_FAIL; } - else - logerror("This is not a valid Lynx image\n"); - return IMAGE_VERIFY_FAIL; } } @@ -2085,13 +2083,25 @@ if (lynx_verify_cart((char*)header, LYNX_CART) == IMAGE_VERIFY_FAIL) return IMAGE_INIT_FAIL; - /* 2008-10 FP: According to Handy source these should be page_size_bank0. Are we using - it correctly in MESS? Moreover, the next two values should be page_size_bank1. We should - implement this as well */ - gran = header[4] | (header[5] << 8); + if (!strncmp("LYNX", (char *)header, 4)) // image has header + { + /* 2008-10 FP: According to Handy source these should be page_size_bank0. Are we using + it correctly in MESS? Moreover, the next two values should be page_size_bank1. We should + implement this as well */ + gran = header[4] | (header[5] << 8); - logerror ("%s %dkb cartridge with %dbyte granularity from %s\n", header + 10, size / 1024, gran, header + 42); - size -= 0x40; + logerror ("%s %dkb cartridge with %dbyte granularity from %s\n", header + 10, size / 1024, gran, header + 42); + size -= 0x40; + } + else + { + image.fseek ( 0, SEEK_SET ); + + if (size > 0xffff) // 64,128,256,512k cartridges + gran = size >> 8; + else + gran = 0x400; // Homebrew roms + } } } | ||||
Relationships
There are no relationship linked to this issue. |
Notes
4
No.12478
cuavas Administrator
Mar 27, 2016, 00:18
|
There are a lot of changes to the fullpath loading code in between 0.171 and 0.172. Fullpath loading for zip and 7zip archives has been tested on various systems with the code for 0.172 and seen to be working. Could you please re-test this when 0.172 is released? Also, please post the contents of the zip archive, including all files and directory structure. |
---|---|
No.12479
AmatCoder Tester
Mar 27, 2016, 01:11
edited on: Mar 27, 2016, 01:18 |
Yesterday I compiled and tested with git version and it did not work. Files are no-intro roms...It fails with all, even unzipped. Example: sdlmame lynx -cart "home/user/Downloads/roms/Klax (USA, Europe).lnx" lynx.bin ROM NEEDS REDUMP WARNING: the machine might not run correctly. FATALERROR: Device Generic ROM Socket / RAM Socket / Cartridge Slot load failed: Unspecified error PS.- Fullpath loading works with all systems that I tried except Atari Lynx. |
No.12480
Tafoid Administrator
Mar 27, 2016, 04:16
|
The problem here is that NO-INTRO sets were likely never handled correctly at all via fullpath -cart loading. The lynx driver is very old (created over 15 years ago) and with little modification since its addition to source. Back then, the images were not raw (headerless) like as presented by NO_INTRO as most game images for all systems had developer created header files to best handle image types, sizes, mapping, etc. In this case, a 64-byte header detailing the image was and is required by the cart loading routine in source so if you attempt to load a NO-INTRO image (again, no added data/headers), the external cart load will fail. The -cart fullpath load works fine with a GoodLynx copy of the same software (contains this header) and while the softlist entries use no-intro and they are loaded properly using this method - the external cart loading takes a different path and at this time only works with images containing headers. |
No.12483
AmatCoder Tester
Mar 27, 2016, 18:28
edited on: Mar 27, 2016, 18:34 |
I have uploaded a possible patch to fix this issue (now it works with headerless images). Feel free to rewrite it because I am not familiar with MAME source code. |