Page 6 of 7 FirstFirst ... 4567 LastLast
Results 51 to 60 of 67

Thread: Space Invaders

  1. #51
    EmuTalk Member
    Join Date
    Jun 2010
    Posts
    1
    Mentioned
    0 Post(s)
    I'm also making space invaders emulator and still have some problems which prevents playing the game.

    At the moment everything looks like it should until to the part where invaders should come to the screen and then the screen wipes black and resets the program. Same thing happens if I insert coins and press start.

    I think the shift register works like it should but I don't know why does this happen.

    Other thing is that I got bored playing with the space invaders and tried out the balloon bomber and lunar rescue roms also as they should work with the same hardware I think. But I don't get it how can they work if the rom size is bigger than space invaders 8KB < 12KB. Then they try to set the stack pointer to 0x2400 like space invaders. Isn't that rom area? Anyway as result I get messed graphics in the title screen because it is writing over the program area

  2. #52
    EmuTalk Member
    Join Date
    Jul 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Hello everybody (New here hope you can help )

    I am trying to write Space Invaders on a new OS called SpecBas (it uses the ZX Spectrum Basic++ and outputs to Windows,Linux) it's in Alpha stage and I'm helping test it. (It's a bit like AMOS for the AMIGA but for PC's)

    Anyway....

    so I have managed to enter all the op codes and I am now up to the part where it draws the aliens in attract mode and from what I can understand (and I use that term in the loosest sense) I now need to emulate IN and OUT for the 'bit shifting' ???

    and this is where I am stuck.

    so in simple (idiot if you like) terms, what is 'bit shifting'?


    how does the IN and OUT affect it (so which ones should I be emulating)

    and where are the results stored? are the in the rom/ram or are they stored elsewhere (so I need to set up a new variable?)


    Thanks for any help you can give me.

    P.S. OR AM I TOTALLY WRONG HERE AND WHAT SHOULD I DO TO GET THE ALIENS DRAWING ?
    Last edited by ASH-II; May 17th, 2013 at 20:08.

  3. #53
    EmuTalk Member pradipna's Avatar
    Join Date
    Sep 2005
    Posts
    54
    Mentioned
    0 Post(s)
    "what is 'bit shifting'?"

    I don't know the 'In' and 'Out' you're talking about (hadn't attempted to make a space invaders emulator ) but bit shifting is really simple. Read the Bit Shift section of this: http://en.wikipedia.org/wiki/Bitwise_operation
    In C++ you can use << and >> operators to shift bits.

    And really nice screen shots, good luck!

  4. #54
    EmuTalk Member
    Join Date
    Jul 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Thanks for the link.

    yes I understand that bit it's similar to rrc,rlc, etc I am confused which ports I need to emulate (this is the IN and OUT) just enough to get it running.

    As you can see it won't show the Aliens , so is there an interrupt that I'm missing like the screen beam at $20c0
    Last edited by ASH-II; July 16th, 2011 at 20:46.

  5. #55
    EmuTalk Member
    Join Date
    Jul 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Update (if anyone is reading this)

    so I got the aliens working and fixed loads of bugs (stupid , stupid opcode mistakes....by me)



    the aliens not showing was the SBI opcode

    and I now have sound

    Just one more bug to fix.....when I shoot the saucer the score shows as 'CLE' instead of '150' also the saucer score is not added to the total score....sigh.


    • Advertising

      advertising
      EmuTalk.net
      has no influence
      on the ads that
      are displayed
        
       

  6. #56
    EmuTalk Member
    Join Date
    May 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Hey guys, I've been looking at my opcodes for a week now but so far I couldn't accomplish anything on my game, it is always freezing on the ReadByte function telling me it has overflown. I'm developing my emulator in C#. I've seen a lot of sources, like the It's a trap, the one from emulator101.com and js8080, I've compared them with my opcodes but no lucky. Could you take a look and point out the error I'm making ? I'm not asking anyone to DO the emulator for me, but simply help and point the errors out !

    My CPU class: pastebin.com/FzSXW2Cg

    Thank you very much !

  7. #57
    EmuTalk Member TRS's Avatar
    Join Date
    Jan 2002
    Location
    Emmen
    Posts
    67
    Mentioned
    0 Post(s)
    Looking at the code provided I have to do some assumptions. I image manager is an array representing the memory which can be max 64K. Using an int as address pointer can cause overflows as an int in C# is 32 bits whereas the addressbus of the 8080 is only 16 bits. Try to change the PC.Value to ushort (that's a 16 bit unsigned int).

    Also when returning a value from an array it is good practise to check if the value provided fits in the bounds of the array before returning the value from the array.

    Good luck programming!
    DubbingIssaMuss

  8. #58
    EmuTalk Member
    Join Date
    May 2013
    Posts
    5
    Mentioned
    0 Post(s)
    TRS, thanks for the quick reply ! I'm aware of all this assumptions you made, but I don't think that my problem is related to architecture problems, but with the opcode table. For what I've seen, SI uses only 50 opcodes, but I've implemented almost all of the 8080 op's, 'cause I want to develop a GB emulator in the future (I know its Z80 ). Anyway, thanks for pointing that out but do you have any ideas ?

    Thanks dude !

  9. #59
    EmuTalk Member TRS's Avatar
    Join Date
    Jan 2002
    Location
    Emmen
    Posts
    67
    Mentioned
    0 Post(s)
    Try running in debug mode. When the overflow occurs, check all relevant variables values and see if they are still within bounds. Then try to find out why the variable went out of bounds.
    DubbingIssaMuss

  10. #60
    EmuTalk Member
    Join Date
    May 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Hello everyone !
    I managed to (hopefully) make my core works as expected. But now I'm having problem with the screen. I couldn't understand how to draw things on it. I've seen some sources but all people use Windows API to do so, and since I'm developing my emulator in C# I can override the "OnPaint" event to make it works, but I can't understand how video works (and how to code it) in c#; Simplifying, I know SI starts drawing at memory address 0x2400 and has a length of 1c00; The "img" must be rotated 90 anti-clock; I think my problem is related to the interrupt (which I couldn't fully understand as well).
    Thank you !

Page 6 of 7 FirstFirst ... 4567 LastLast

Similar Threads

  1. help with space channel 5
    By Tails Prower in forum Chankast
    Replies: 2
    Last Post: October 30th, 2004, 11:41
  2. how to manage for the memory space?
    By swings in forum Chankast
    Replies: 4
    Last Post: July 8th, 2004, 12:49
  3. Bug found in Space Station Silicon Valley [E]
    By -Shadow- in forum General N64 Emulation Discussion
    Replies: 0
    Last Post: May 22nd, 2004, 13:14
  4. Backfacing culling in ****geneous space?
    By Orkin in forum Programming
    Replies: 6
    Last Post: January 12th, 2004, 09:36

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •