MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

dgame
MAME Fan
Reged: 05/10/10
Posts: 5
Send PM


MAME 149 SEC_REQUE$T_STATUS typo in /src/mame/machine/sec.c/h
#310543 - 06/19/13 07:13 PM


Hi,

The variable SEC_REQUE$T_STATUS is used in /src/mame/machine/sec.h [line 4]

and /src/mame/machine/sec.c [line 109]

It causes the compiler to throw an error on the SDL build but goes through on the Windows build.

I think it should be named SEC_REQUEST_STATUS instead of SEC_REQUE$T_STATUS.



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: MAME 149 SEC_REQUE$T_STATUS typo in /src/mame/machine/sec.c/h new [Re: dgame]
#310545 - 06/19/13 07:17 PM


> It causes the compiler to throw an error on the SDL build but goes through on the
> Windows build.

Actually, it's been that way since April of 2012, and all known SDL builds didn't mind it, including distro builds for Fedora, Ubuntu, Debian, Slack, and SuSE, and OS X builds from 10.5 to 10.8.4. It does appear to be a typo though.

What is your specific OS environment and gcc --version?



dgame
MAME Fan
Reged: 05/10/10
Posts: 5
Send PM


Re: MAME 149 SEC_REQUE$T_STATUS typo in /src/mame/machine/sec.c/h new [Re: R. Belmont]
#310636 - 06/21/13 04:38 PM


I am compiling on the Pandora handheld (1GHz ARM Cortex A8 running [Ångström] Linux 3.2.39) using GCC 4.3.3.

I finally figured out how to modify the source to build the older versions for ARM. I have successfully built SDLMAME 126,132, and 134. I was trying to build the latest version [149] when it erred at the typo.

I was waiting until 149 finished building so I could report any peculiarities. It seems to takes over a day to link 149 and my system froze before it ever finished. I don’t know if it’s even possible to compile 149 with GCC 4.3.3.



dgame
MAME Fan
Reged: 05/10/10
Posts: 5
Send PM


Re: MAME 149 SEC_REQUE$T_STATUS typo in /src/mame/machine/sec.c/h new [Re: dgame]
#310639 - 06/21/13 07:05 PM


Read this post http://www.mameworld.info/ubbthreads/showthreaded.php?Cat=&Number=305723 and made these [adapted to 149] changes and now SDLMAME 149 (SUBTARGET=tiny) compiles and works:

/source/makefile: comment out 502 and 503
# -Wall \
# -Wcast-align \

/source/src/emu/emualloc.c: comment out 300 and 301
// if (LOG_ALLOCS)
// fprintf(stderr, "#%06d, add %d bytes (%s:%d)\n", (UINT32)entry->m_id, static_cast(entry->m_size), entry->m_file, (int)entry->m_line);

295: change
memory_entry *entry = memory_entry::find(item.m_ptr);
to
resource_pool_item *entry = resource_pool::find(item.m_ptr);

297: change
entry = memory_entry::find(reinterpret_cast(item.m_ptr) - sizeof(size_t));
to
entry = resource_pool::find(reinterpret_cast(item.m_ptr) - sizeof(size_t));

Build with "make NOASM=1 NOWERROR=1"

It is a slide-show though so I am sticking with 134.

PS: The forum seems to be gobbling up the < U I N T 8 * > needed after reinterpret_cast on line 297 above. Use the same < > syntax as the original.



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: MAME 149 SEC_REQUE$T_STATUS typo in /src/mame/machine/sec.c/h new [Re: dgame]
#310644 - 06/21/13 10:23 PM


> I finally figured out how to modify the source to build the older versions for ARM. I
> have successfully built SDLMAME 126,132, and 134. I was trying to build the latest
> version [149] when it erred at the typo.

That's quite odd. Other GCCs, including the ARM GCC on the OLPC 1.75, don't mind that line at all. Is the locale on the Pandora set to something unusual?

> I was waiting until 149 finished building so I could report any peculiarities. It
> seems to takes over a day to link 149 and my system froze before it ever finished. I
> don’t know if it’s even possible to compile 149 with GCC 4.3.3.

GCC back to 4.0.x is supported in some capacity, although compiles on versions prior to 4.6 are generally not tested as often and thus can and will ship broken.

As far as link time, compiling MAME with less than 1 GB of available RAM is a very, very bad idea - I strongly recommend a cross-compiler for that scenario if one's available. Or just put about 24 gigs of swap on an SD card and cross your fingers



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: MAME 149 SEC_REQUE$T_STATUS typo in /src/mame/machine/sec.c/h new [Re: dgame]
#310645 - 06/21/13 10:34 PM


You don't need the makefile changes if you use NOWERROR=1, for the record.

The emualloc.c stuff is extraordinarily dangerous and things will not run as intended with that in place. I'm trying to pry an official fix out of the relevant people, but until then it would be wise to not distribute any binary built with those changes.


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 535 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1608