How did people program for Consoles with multiple CPUs? The Next CEO of Stack OverflowHow were analytics gathered on software built for retrocomputing platforms?Did Apple not originally allow anyone to develop software for the Macintosh?How did software engineers test their code in 19xx?Did any major corporation ever successfully sue Microsoft for intellectual property theft?Instruction set support for multiplication with a constantBack in the late 1980s, how was commercial software for 8-bit home computers developed?Why did some CPUs use two Read/Write lines, and others just one?

When airplanes disconnect from a tanker during air to air refueling, why do they bank so sharply to the right?

Visit to the USA with ESTA approved before trip to Iran

What makes a siege story/plot interesting?

What is the difference between "behavior" and "behaviour"?

The King's new dress

Is a stroke of luck acceptable after a series of unfavorable events?

How easy is it to start Magic from scratch?

Opposite of a diet

Can the Reverse Gravity spell affect the Meteor Swarm spell?

Can I equip Skullclamp on a creature I am sacrificing?

How can I open an app using Terminal?

Does the Brexit deal have to be agreed by both Houses?

Return the Closest Prime Number

How did people program for Consoles with multiple CPUs?

Why doesn't a table tennis ball float on the surface? How do we calculate buoyancy here?

How to get regions to plot as graphics

If the heap is initialized for security, then why is the stack uninitialized?

What does this shorthand mean?

Why didn't Theresa May consult with Parliament before negotiating a deal with the EU?

Inappropriate reference requests from Journal reviewers

Only print output after finding pattern

Customer Requests (Sometimes) Drive Me Bonkers!

What does "Its cash flow is deeply negative" mean?

Are there languages with no euphemisms?



How did people program for Consoles with multiple CPUs?



The Next CEO of Stack OverflowHow were analytics gathered on software built for retrocomputing platforms?Did Apple not originally allow anyone to develop software for the Macintosh?How did software engineers test their code in 19xx?Did any major corporation ever successfully sue Microsoft for intellectual property theft?Instruction set support for multiplication with a constantBack in the late 1980s, how was commercial software for 8-bit home computers developed?Why did some CPUs use two Read/Write lines, and others just one?










3















I'm specifically interested in the Sega Mega Drive/Genesis, which used a 68000 CPU, but also a Z80, mainly used to control the sound hardware and provide backward compatibility with the Master System.



There was also the Atari Jaguar, with it's Tom and Jerry RISC chips, the Sega Saturn, Featuring a total of eight processors, and probably a lot more.



When writing code (assuming ASM), how would these additional processors be used/accessed? Did one write regular 68000 code (even for sound) and the 68000 itself handled talking to the Z80? Did one need to write two different programs, one for each CPU? If yes, how did they communicate with each other? Or is memory mapping used, which would require a binary that has both 68000 and Z80 instructions in them, making sure that the Z80 code is in a specific memory region?



(This isn't about "regular" multi-processing, like on newer consoles with multi-core CPUs that are all the same. This is about consoles with a main CPU and specialized co-processors for e.g., Sound. Basically, the Sega Genesis, though I'm looking at building my own custom system, so I'm more interested in the basic principles.)










share|improve this question







New contributor




Michael Stum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • "CPU" probably isn't the best term here, though I'm not certain what the idiomatic one of the time is; while you could have a 68k and a Z80, it was also common to see more specialized support chips. The general concept is called asymmetric multiprocessing.

    – chrylis
    1 min ago
















3















I'm specifically interested in the Sega Mega Drive/Genesis, which used a 68000 CPU, but also a Z80, mainly used to control the sound hardware and provide backward compatibility with the Master System.



There was also the Atari Jaguar, with it's Tom and Jerry RISC chips, the Sega Saturn, Featuring a total of eight processors, and probably a lot more.



When writing code (assuming ASM), how would these additional processors be used/accessed? Did one write regular 68000 code (even for sound) and the 68000 itself handled talking to the Z80? Did one need to write two different programs, one for each CPU? If yes, how did they communicate with each other? Or is memory mapping used, which would require a binary that has both 68000 and Z80 instructions in them, making sure that the Z80 code is in a specific memory region?



(This isn't about "regular" multi-processing, like on newer consoles with multi-core CPUs that are all the same. This is about consoles with a main CPU and specialized co-processors for e.g., Sound. Basically, the Sega Genesis, though I'm looking at building my own custom system, so I'm more interested in the basic principles.)










share|improve this question







New contributor




Michael Stum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • "CPU" probably isn't the best term here, though I'm not certain what the idiomatic one of the time is; while you could have a 68k and a Z80, it was also common to see more specialized support chips. The general concept is called asymmetric multiprocessing.

    – chrylis
    1 min ago














3












3








3








I'm specifically interested in the Sega Mega Drive/Genesis, which used a 68000 CPU, but also a Z80, mainly used to control the sound hardware and provide backward compatibility with the Master System.



There was also the Atari Jaguar, with it's Tom and Jerry RISC chips, the Sega Saturn, Featuring a total of eight processors, and probably a lot more.



When writing code (assuming ASM), how would these additional processors be used/accessed? Did one write regular 68000 code (even for sound) and the 68000 itself handled talking to the Z80? Did one need to write two different programs, one for each CPU? If yes, how did they communicate with each other? Or is memory mapping used, which would require a binary that has both 68000 and Z80 instructions in them, making sure that the Z80 code is in a specific memory region?



(This isn't about "regular" multi-processing, like on newer consoles with multi-core CPUs that are all the same. This is about consoles with a main CPU and specialized co-processors for e.g., Sound. Basically, the Sega Genesis, though I'm looking at building my own custom system, so I'm more interested in the basic principles.)










share|improve this question







New contributor




Michael Stum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I'm specifically interested in the Sega Mega Drive/Genesis, which used a 68000 CPU, but also a Z80, mainly used to control the sound hardware and provide backward compatibility with the Master System.



There was also the Atari Jaguar, with it's Tom and Jerry RISC chips, the Sega Saturn, Featuring a total of eight processors, and probably a lot more.



When writing code (assuming ASM), how would these additional processors be used/accessed? Did one write regular 68000 code (even for sound) and the 68000 itself handled talking to the Z80? Did one need to write two different programs, one for each CPU? If yes, how did they communicate with each other? Or is memory mapping used, which would require a binary that has both 68000 and Z80 instructions in them, making sure that the Z80 code is in a specific memory region?



(This isn't about "regular" multi-processing, like on newer consoles with multi-core CPUs that are all the same. This is about consoles with a main CPU and specialized co-processors for e.g., Sound. Basically, the Sega Genesis, though I'm looking at building my own custom system, so I'm more interested in the basic principles.)







software-development cpu sega-genesis






share|improve this question







New contributor




Michael Stum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Michael Stum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Michael Stum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 hours ago









Michael StumMichael Stum

1163




1163




New contributor




Michael Stum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Michael Stum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Michael Stum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • "CPU" probably isn't the best term here, though I'm not certain what the idiomatic one of the time is; while you could have a 68k and a Z80, it was also common to see more specialized support chips. The general concept is called asymmetric multiprocessing.

    – chrylis
    1 min ago


















  • "CPU" probably isn't the best term here, though I'm not certain what the idiomatic one of the time is; while you could have a 68k and a Z80, it was also common to see more specialized support chips. The general concept is called asymmetric multiprocessing.

    – chrylis
    1 min ago

















"CPU" probably isn't the best term here, though I'm not certain what the idiomatic one of the time is; while you could have a 68k and a Z80, it was also common to see more specialized support chips. The general concept is called asymmetric multiprocessing.

– chrylis
1 min ago






"CPU" probably isn't the best term here, though I'm not certain what the idiomatic one of the time is; while you could have a 68k and a Z80, it was also common to see more specialized support chips. The general concept is called asymmetric multiprocessing.

– chrylis
1 min ago











1 Answer
1






active

oldest

votes


















3














It varies machine to machine; at the simplest end is the Neo Geo — its 68000 and Z80 have completely independent buses. You write one program for the 68000 and one for the Z80 and a single pipe of communication joins the two: post a byte to the Z80 and it'll trigger an NMI; the Z80 can read the command byte from a certain port and write a response to another, the 68000 can poll for the response. Neo Geo also supplied a sample set of Z80 code so you could just treat it as an advanced sound generator and not worry about the implementation if you prefer.



The Mega Drive has a more complicated system of shared buses; the Z80 has some memory on a private bus but the cartridge bus is a shared resource and I think the Z80 can also share some RAM. In that system the VDP can also act as a bus master so in net it's the Z80 getting access to the shared resources only when nobody else is attempting an access, the 68000 having priority only when it doesn't chose to start a VDP transfer, and the VDP having top priority for those periods when the 68000 has command it to do something.



If you ever hear scratchy sampled audio in a Mega Drive game then it's likely to be the Z80 trying to stream from the cartridge but frequently losing out on access slots.



The Saturn is like a more advanced Mega Drive except that the main CPUs have caches that can also be configured as small local memory pools. So if you're careful you can mostly keep them off the shared bus, gaining a significant performance benefit — Virtua Fighter 2 manages to keep most of the data for each player local to a single CPU for most of a frame, the laziest PlayStation ports do nothing in particular and either end up only using a single CPU or effectively doing so as a result of collection.



The Jaguar is supposed to work similarly to the Saturn but, quelle surprise, Atari rushed it to market so there's a significant bug affecting the RISC CPU's accesses to RAM when performing certain types of jump. That's how it often ends up being treated as a machine with a 68000 central processor when really the 68000 was intended just to be an intelligent scheduler.



So: across these systems one generally writes a different program for each processor, and either nominates one as a coordinator or uses a series of ad hoc means of point-to-point communication.



If it sounds hard to get right, that's because it is — programmers much prefer systems like the original PlayStation with a single CPU that just goes quickly.






share|improve this answer























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "648"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );






    Michael Stum is a new contributor. Be nice, and check out our Code of Conduct.









    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f9458%2fhow-did-people-program-for-consoles-with-multiple-cpus%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    It varies machine to machine; at the simplest end is the Neo Geo — its 68000 and Z80 have completely independent buses. You write one program for the 68000 and one for the Z80 and a single pipe of communication joins the two: post a byte to the Z80 and it'll trigger an NMI; the Z80 can read the command byte from a certain port and write a response to another, the 68000 can poll for the response. Neo Geo also supplied a sample set of Z80 code so you could just treat it as an advanced sound generator and not worry about the implementation if you prefer.



    The Mega Drive has a more complicated system of shared buses; the Z80 has some memory on a private bus but the cartridge bus is a shared resource and I think the Z80 can also share some RAM. In that system the VDP can also act as a bus master so in net it's the Z80 getting access to the shared resources only when nobody else is attempting an access, the 68000 having priority only when it doesn't chose to start a VDP transfer, and the VDP having top priority for those periods when the 68000 has command it to do something.



    If you ever hear scratchy sampled audio in a Mega Drive game then it's likely to be the Z80 trying to stream from the cartridge but frequently losing out on access slots.



    The Saturn is like a more advanced Mega Drive except that the main CPUs have caches that can also be configured as small local memory pools. So if you're careful you can mostly keep them off the shared bus, gaining a significant performance benefit — Virtua Fighter 2 manages to keep most of the data for each player local to a single CPU for most of a frame, the laziest PlayStation ports do nothing in particular and either end up only using a single CPU or effectively doing so as a result of collection.



    The Jaguar is supposed to work similarly to the Saturn but, quelle surprise, Atari rushed it to market so there's a significant bug affecting the RISC CPU's accesses to RAM when performing certain types of jump. That's how it often ends up being treated as a machine with a 68000 central processor when really the 68000 was intended just to be an intelligent scheduler.



    So: across these systems one generally writes a different program for each processor, and either nominates one as a coordinator or uses a series of ad hoc means of point-to-point communication.



    If it sounds hard to get right, that's because it is — programmers much prefer systems like the original PlayStation with a single CPU that just goes quickly.






    share|improve this answer



























      3














      It varies machine to machine; at the simplest end is the Neo Geo — its 68000 and Z80 have completely independent buses. You write one program for the 68000 and one for the Z80 and a single pipe of communication joins the two: post a byte to the Z80 and it'll trigger an NMI; the Z80 can read the command byte from a certain port and write a response to another, the 68000 can poll for the response. Neo Geo also supplied a sample set of Z80 code so you could just treat it as an advanced sound generator and not worry about the implementation if you prefer.



      The Mega Drive has a more complicated system of shared buses; the Z80 has some memory on a private bus but the cartridge bus is a shared resource and I think the Z80 can also share some RAM. In that system the VDP can also act as a bus master so in net it's the Z80 getting access to the shared resources only when nobody else is attempting an access, the 68000 having priority only when it doesn't chose to start a VDP transfer, and the VDP having top priority for those periods when the 68000 has command it to do something.



      If you ever hear scratchy sampled audio in a Mega Drive game then it's likely to be the Z80 trying to stream from the cartridge but frequently losing out on access slots.



      The Saturn is like a more advanced Mega Drive except that the main CPUs have caches that can also be configured as small local memory pools. So if you're careful you can mostly keep them off the shared bus, gaining a significant performance benefit — Virtua Fighter 2 manages to keep most of the data for each player local to a single CPU for most of a frame, the laziest PlayStation ports do nothing in particular and either end up only using a single CPU or effectively doing so as a result of collection.



      The Jaguar is supposed to work similarly to the Saturn but, quelle surprise, Atari rushed it to market so there's a significant bug affecting the RISC CPU's accesses to RAM when performing certain types of jump. That's how it often ends up being treated as a machine with a 68000 central processor when really the 68000 was intended just to be an intelligent scheduler.



      So: across these systems one generally writes a different program for each processor, and either nominates one as a coordinator or uses a series of ad hoc means of point-to-point communication.



      If it sounds hard to get right, that's because it is — programmers much prefer systems like the original PlayStation with a single CPU that just goes quickly.






      share|improve this answer

























        3












        3








        3







        It varies machine to machine; at the simplest end is the Neo Geo — its 68000 and Z80 have completely independent buses. You write one program for the 68000 and one for the Z80 and a single pipe of communication joins the two: post a byte to the Z80 and it'll trigger an NMI; the Z80 can read the command byte from a certain port and write a response to another, the 68000 can poll for the response. Neo Geo also supplied a sample set of Z80 code so you could just treat it as an advanced sound generator and not worry about the implementation if you prefer.



        The Mega Drive has a more complicated system of shared buses; the Z80 has some memory on a private bus but the cartridge bus is a shared resource and I think the Z80 can also share some RAM. In that system the VDP can also act as a bus master so in net it's the Z80 getting access to the shared resources only when nobody else is attempting an access, the 68000 having priority only when it doesn't chose to start a VDP transfer, and the VDP having top priority for those periods when the 68000 has command it to do something.



        If you ever hear scratchy sampled audio in a Mega Drive game then it's likely to be the Z80 trying to stream from the cartridge but frequently losing out on access slots.



        The Saturn is like a more advanced Mega Drive except that the main CPUs have caches that can also be configured as small local memory pools. So if you're careful you can mostly keep them off the shared bus, gaining a significant performance benefit — Virtua Fighter 2 manages to keep most of the data for each player local to a single CPU for most of a frame, the laziest PlayStation ports do nothing in particular and either end up only using a single CPU or effectively doing so as a result of collection.



        The Jaguar is supposed to work similarly to the Saturn but, quelle surprise, Atari rushed it to market so there's a significant bug affecting the RISC CPU's accesses to RAM when performing certain types of jump. That's how it often ends up being treated as a machine with a 68000 central processor when really the 68000 was intended just to be an intelligent scheduler.



        So: across these systems one generally writes a different program for each processor, and either nominates one as a coordinator or uses a series of ad hoc means of point-to-point communication.



        If it sounds hard to get right, that's because it is — programmers much prefer systems like the original PlayStation with a single CPU that just goes quickly.






        share|improve this answer













        It varies machine to machine; at the simplest end is the Neo Geo — its 68000 and Z80 have completely independent buses. You write one program for the 68000 and one for the Z80 and a single pipe of communication joins the two: post a byte to the Z80 and it'll trigger an NMI; the Z80 can read the command byte from a certain port and write a response to another, the 68000 can poll for the response. Neo Geo also supplied a sample set of Z80 code so you could just treat it as an advanced sound generator and not worry about the implementation if you prefer.



        The Mega Drive has a more complicated system of shared buses; the Z80 has some memory on a private bus but the cartridge bus is a shared resource and I think the Z80 can also share some RAM. In that system the VDP can also act as a bus master so in net it's the Z80 getting access to the shared resources only when nobody else is attempting an access, the 68000 having priority only when it doesn't chose to start a VDP transfer, and the VDP having top priority for those periods when the 68000 has command it to do something.



        If you ever hear scratchy sampled audio in a Mega Drive game then it's likely to be the Z80 trying to stream from the cartridge but frequently losing out on access slots.



        The Saturn is like a more advanced Mega Drive except that the main CPUs have caches that can also be configured as small local memory pools. So if you're careful you can mostly keep them off the shared bus, gaining a significant performance benefit — Virtua Fighter 2 manages to keep most of the data for each player local to a single CPU for most of a frame, the laziest PlayStation ports do nothing in particular and either end up only using a single CPU or effectively doing so as a result of collection.



        The Jaguar is supposed to work similarly to the Saturn but, quelle surprise, Atari rushed it to market so there's a significant bug affecting the RISC CPU's accesses to RAM when performing certain types of jump. That's how it often ends up being treated as a machine with a 68000 central processor when really the 68000 was intended just to be an intelligent scheduler.



        So: across these systems one generally writes a different program for each processor, and either nominates one as a coordinator or uses a series of ad hoc means of point-to-point communication.



        If it sounds hard to get right, that's because it is — programmers much prefer systems like the original PlayStation with a single CPU that just goes quickly.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 hours ago









        TommyTommy

        15.6k14476




        15.6k14476




















            Michael Stum is a new contributor. Be nice, and check out our Code of Conduct.









            draft saved

            draft discarded


















            Michael Stum is a new contributor. Be nice, and check out our Code of Conduct.












            Michael Stum is a new contributor. Be nice, and check out our Code of Conduct.











            Michael Stum is a new contributor. Be nice, and check out our Code of Conduct.














            Thanks for contributing an answer to Retrocomputing Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f9458%2fhow-did-people-program-for-consoles-with-multiple-cpus%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            名間水力發電廠 目录 沿革 設施 鄰近設施 註釋 外部連結 导航菜单23°50′10″N 120°42′41″E / 23.83611°N 120.71139°E / 23.83611; 120.7113923°50′10″N 120°42′41″E / 23.83611°N 120.71139°E / 23.83611; 120.71139計畫概要原始内容臺灣第一座BOT 模式開發的水力發電廠-名間水力電廠名間水力發電廠 水利署首件BOT案原始内容《小檔案》名間電廠 首座BOT水力發電廠原始内容名間電廠BOT - 經濟部水利署中區水資源局

            Prove that NP is closed under karp reduction?Space(n) not closed under Karp reductions - what about NTime(n)?Class P is closed under rotation?Prove or disprove that $NL$ is closed under polynomial many-one reductions$mathbfNC_2$ is closed under log-space reductionOn Karp reductionwhen can I know if a class (complexity) is closed under reduction (cook/karp)Check if class $PSPACE$ is closed under polyonomially space reductionIs NPSPACE also closed under polynomial-time reduction and under log-space reduction?Prove PSPACE is closed under complement?Prove PSPACE is closed under union?

            Is my guitar’s action too high? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Strings too stiff on a recently purchased acoustic guitar | Cort AD880CEIs the action of my guitar really high?Μy little finger is too weak to play guitarWith guitar, how long should I give my fingers to strengthen / callous?When playing a fret the guitar sounds mutedPlaying (Barre) chords up the guitar neckI think my guitar strings are wound too tight and I can't play barre chordsF barre chord on an SG guitarHow to find to the right strings of a barre chord by feel?High action on higher fret on my steel acoustic guitar