Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 560585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:21:33+00:00 2026-05-13T12:21:33+00:00

I was trying to make a Intel 8080 CPU emulator (then I’d like to

  • 0

I was trying to make a Intel 8080 CPU emulator (then I’d like to emulate Space Invaders, which use it).

I coded nearly complete implementation of this CPU (thanks to MAME and Tickle project (mostly) 😉 ) except undocument instructions (0x08, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38, 0x0CB, 0x0D9, 0x0DD, 0x0ED, 0x0FD).

I’ve have only problems when I compile it, I don’t know why.

This is the code:

static const unsigned char cycles_table[256] =
{
    /*                       8080's Cycles Table                         */
    /*     0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F */
    /*0*/  4, 10,  7,  5,  5,  5,  7,  4,  0, 10,  7,  5,  5,  5,  7,  4,
    /*1*/  0, 10,  7,  5,  5,  5,  7,  4,  0, 10,  7,  5,  5,  5,  7,  4,
    /*2*/  0, 10, 16,  5,  5,  5,  7,  4,  0, 10, 16,  5,  5,  5,  7,  4,
    /*3*/  0, 10, 13,  5, 10, 10, 10,  4,  0, 10, 13,  5,  5,  5,  7,  4,
    /*4*/  5,  5,  5,  5,  5,  5,  7,  5,  5,  5,  5,  5,  5,  5,  7,  5,
    /*5*/  5,  5,  5,  5,  5,  5,  7,  5,  5,  5,  5,  5,  5,  5,  7,  5,
    /*6*/  5,  5,  5,  5,  5,  5,  7,  5,  5,  5,  5,  5,  5,  5,  7,  5,
    /*7*/  7,  7,  7,  7,  7,  7,  7,  7,  5,  5,  5,  5,  5,  5,  7,  5,
    /*8*/  4,  4,  4,  4,  4,  4,  7,  4,  4,  4,  4,  4,  4,  4,  7,  4,
    /*9*/  4,  4,  4,  4,  4,  4,  7,  4,  4,  4,  4,  4,  4,  4,  7,  4,
    /*A*/  4,  4,  4,  4,  4,  4,  7,  4,  4,  4,  4,  4,  4,  4,  7,  4,
    /*B*/  4,  4,  4,  4,  4,  4,  7,  4,  4,  4,  4,  4,  4,  4,  7,  4,
    /*C*/  5, 10, 10, 10, 11, 11,  7, 11,  5, 10, 10,  0, 11, 17,  7, 11,
    /*D*/  5, 10, 10, 10, 11, 11,  7, 11,  5,  0, 10, 10, 11,  0,  7, 11,
    /*E*/  5, 10, 10, 18, 11, 11,  7, 11,  5,  5, 10,  4, 11,  0,  7, 11,
    /*F*/  5, 10, 10,  4, 11, 11,  7, 11,  5,  5, 10,  4, 11,  0,  7, 11
};

g++ takes me this error:

8080.h:521: error: invalid in-class initialization of static data member of non- integral type `const unsigned char[256]’

This array is in a class called i8080.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:21:33+00:00Added an answer on May 13, 2026 at 12:21 pm

    Like it says, you cannot initialize static non-integral types in a class definition. That is, you could do this:

    static const unsigned value = 123;
    static const bool value_again = true;
    

    But not anything else.

    What you should do is place this in your class definition:

    static const unsigned char cycles_table[256];
    

    And in the corresponding source file, place what you have:

    const unsigned char i8080::cycles_table[256] = // ...
    

    What this does is say (in the definition), “Hey, there’s gonna be this array.” and in the source file, “Hey, here’s that array.”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm trying to make my image search with google ajax search i'm using jQuery.
I'm trying make a <dl> to define the icons I am using on the
I am working with nHibernate, and trying make sense of bag collections. My data
I'm trying to tweak my MySQL server to fit my needs... and I have
I'm pretty new to Perl/HTML. Here is what I'm trying to do with WWW::Mechanize
Trying a mental reset here: I tried to create a reliable, persistent stack with
I found all things working with alert box,dialog box but when i try creating
I'd to create some transitions between pages. I've made it this way: $(div.fading).css('display', 'none');
One of my homework questions asked to develop a regex for all strings over
I'm a beginner in Java programming language, and I have a problem that I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.