Welcome to Emulationworld

Forum Index | FAQ | New User | Login | Search

Make a New PostPrevious ThreadView All ThreadsNext Thread*Show in Threaded Mode


Subjectmame programming guide? new Reply to this message
Posted bywhgwbn
Posted on03/21/05 09:35 PM



There should be a mame programming guide to introduce the architeture of mame source code,includes module processes.
It's so great software project!




SubjectRe: mame programming guide? new Reply to this message
Posted bysmf
Posted on03/24/05 02:43 AM



There used to be some guides around, although they are out of date on the details they should help a little bit. Really the only way you can learn stuff though is to poke around, nobody is going to document everything as there is so much and it changes too often.

Not everything in MAME is necessarily done the best or right way so don't just blindly copy everything you see.

smf





SubjectRe: mame programming guide? new Reply to this message
Posted bywhgwbn
Posted on03/24/05 10:56 PM



If I have some questions and I can ask to mame team?


SubjectRe: mame programming guide? new Reply to this message
Posted byBart T.
Posted on03/24/05 11:14 PM



> If I have some questions and I can ask to mame team?
>


The MAME message board would be a good place to ask specific questions regarding the source code, I imagine.


Subjectsome questions new Reply to this message
Posted bywhgwbn
Posted on03/25/05 02:40 AM



Thanks.I read the source code these days and I have understand the memory, cpu, timer and interrupt processes. But the video process is so complex and hard to understand.Here is some question:

1. How does the pallet and the pen work? What's the virtual pallet?

2.Input adjust do what?

3.What's the Hold and Assert interrupt?

4.Input and interrupt process is in vblank callback,so it's not real time process?

5.Can you tell me the detail of the pallet process(includes adjust pallet, dirty pen etc) and gfx process?Here is too complex.

BTW:Who's the author of drawgfx.c?It includes itself several times to generate diffierent functions. But it's the best way?I think there should be better way and write the more readable code.:)

6. How does the sounds work? Can you give me a sample?




SubjectRe: some questions Reply to this message
Posted byR. Belmont
Posted on04/07/05 12:48 PM



> 1. How does the pallet and the pen work? What's the virtual pallet?

MAME internally renders to a 16-bit wide buffer. However, in most cases, it's treated as paletted, with up to 65,534 colors (white and black are reserved by the UI). A "pen" is an individual palette color.

> 2.Input adjust do what?

Don't know what you're talking about here.

> 3.What's the Hold and Assert interrupt?

"Hold" means an interrupt is held until the CPU acks it, and then it's automatically lowered. "Assert" means the interrupt is asserted until the driver de-asserts it.

> 4.Input and interrupt process is in vblank callback,so it's not real time
> process?

MAME reads the inputs once per frame (during emulated vblank). Interrupts can occur at any time during the emulated frame for e.g. raster effects on NeoGeo.

> 5.Can you tell me the detail of the pallet process(includes adjust pallet, dirty
> pen etc) and gfx process?Here is too complex.

This seems like a duplicate of your question above.

> BTW:Who's the author of drawgfx.c?It includes itself several times to generate
> diffierent functions. But it's the best way?I think there should be better way
> and write the more readable code.:)

It's not intended to be readable, and in fact you don't have to know a thing about the internals of drawgfx to successfully write a driver.

> 6. How does the sounds work? Can you give me a sample?

You need to understand basic digital audio terminology before we can start on this and I'm not sure you do.

Again, you'll get better/faster answers on the MAME.net messageboards and your same login from here works there.




SubjectRe: some questions new Reply to this message
Posted byTourniquet
Posted on04/12/05 05:17 PM




> Again, you'll get better/faster answers on the MAME.net messageboards and your
> same login from here works there.

He did, and we did, about a month ago :)


--
Paul


Previous ThreadView All ThreadsNext Thread*Show in Threaded Mode