Page 4 of 9 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 84

Thread: Space Invaders

  1. #31
    EmuTalk Member hap's Avatar
    Join Date
    Jan 2005
    Posts
    188
    Mentioned
    0 Post(s)
    If the crash is a Windows program crash, it's probably due to the program reading/writing outside of an array. If it's an 'internal' crash, it's most likely due to a bug in your CPU core.



    As for the upside-down graphics, when updating the window, you'll have to read the 8 bits from the vram bytes in reversed order. I had the exact same problem.

  2. #32
    EmuTalk Member
    Join Date
    Jul 2006
    Posts
    6
    Mentioned
    0 Post(s)
    I would have never thought of the reverse order video...

    Well, I fixed up the rotate instructions so it goes in game and the attract play works great. Still more bugs to work out though, like those wierd bunker hits and the fact that the '0' in the score is deformed when hit (?!) and the alien that fixes up the inverted 'Y' is missing in the attract mode.

    Anyway, atleast it'll a be a tad easier now that I get some actual game screen so I can immediately make changes and see them right away.


  3. #33
    EmuTalk Member
    Join Date
    Jul 2006
    Posts
    6
    Mentioned
    0 Post(s)


    I've been staring at the CPU code for quite a bit when really the in game issues were caused by the shift register shifting left to make room for new data instead of shifting right...The bunker and shots look right and the aliens don't leave impressions of themselves as they advance. I thought all was well but the inverted Y at the second round of attract mode still doesn't have the alien coming out to fix it...This is the last niggling issue left until the game runs perfectly well (atleast to me and SI). I'm clueless as to what's causing it. I had a look at the MAME source but I'm still stuck. I was thinking of trying the NES out but having this irritating issue left...

    Hap if you have any clues as to what's causing this it would be much appreciated. Unitl then, I'm going for a NES emulator. I got a good grasp on the 6502 and the PPU. Audio has to wait but I'll try my best to understand it.


  4. #34
    EmuTalk Member hap's Avatar
    Join Date
    Jan 2005
    Posts
    188
    Mentioned
    0 Post(s)
    It's probably a bug hidden somewhere in your 8080 core. With only one game that can be used for testing (Space Invaders), I understand it's annoying and very hard to find it.
    Actually, it might be easy to add support for games using similar hardware, that would make testing easier, but I haven't looked in to that myself. I suggest you just forget about :/ and move on to another fun project, like the NES. Space Invaders isn't worth the irritating hours it may take to find the bug

  5. #35
    EmuTalk Member
    Join Date
    Jul 2007
    Posts
    4
    Mentioned
    0 Post(s)

    SI and Phoenix

    Here's my progress on SI emulator and Phoenix (it's in JAVA), the i8080 assembly manual on the first page is really helpful for anyone who wants to write his own 8080 cpu core.

    I had to copy the interrupt handling and IN/OUT routine from "it's a trap" since I was too lazy to do it myself (I hope you don't mind )

    As for Phoenix, I reused my cpu core (8080, phoenix uses 8085) and implemented the memory emulation.
    I used the AEHOWTO.txt doc for the memory emulation and I had to use Jabawape 0.21 src for graphics emulation, since the doc that I found didn't elaborate much on it's video hardware and couldn't fully understand it.
    Last edited by krypt100; July 29th, 2007 at 21:03.

  6. #36
    EmuTalk Member
    Join Date
    Dec 2005
    Posts
    14
    Mentioned
    0 Post(s)

    Tux

    Hi guys, I've upgraded from Chip-8 to Space Invaders. The emulator is being coded in C (C99 standard) in a 32-bit Linux environment (Ubuntu 8.10). The emulator currently relies on the X Window system. I will re/upload my work as it evolves.

    My current status on this project is below;
    - i8080 Core 85%
    date: 20/01/09
    At the moment, it should be able to compile on any little-endian platform that has support for the standard C libraries. However, if your not using a platform that has support for the X Window System, you won't be able to compile with debug mode enabled.

    - i8080 disassembler 100%
    Date: 20/01/09
    Disassembles Intel 8080 machine code. Should be able to compile and run on any platform that supports the standard C libraries. To disassemble machine code type;
    Code:
    ./executable input output
    - i8080 Assembler 100%
    Date: 21/01/09
    Will assemble anything that comes out of the disassembler found above. At the moment it does not contain a user manual containing the mnemonics, nor does it contain a manual of how the input should be structured. All I can recommend at the moment is to find some i8080 machine code and disassemble to get an idea of the programming structure. To assemble assembly code type;
    Code:
    ./executable input output
    - System Misc Hardware 10%

    - System keypad/coins 0%

    - System Graphics 10%

    - System Audio 0%

    I will not provide any protected i8080 machine code. Sorry.
    Last edited by Thesuperchang; January 22nd, 2009 at 07:25.

  7. #37
    EmuTalk Member
    Join Date
    Aug 2008
    Posts
    2
    Mentioned
    0 Post(s)

    Exclamation Screen Update Bug

    Hi all, i need little from you guys to fix a bug in my space invaders emulator. I'm trying to understand how to update the screen. I'm doing something wrong , cause the player and the aliens are leaving impressions of themselves on screen. If you now how to fix it, let me know. I'm coding in C and Allegro.

    thanks anyway
    Last edited by Antígeno; January 22nd, 2009 at 11:39.

  8. #38
    EmuTalk Member
    Join Date
    May 2008
    Posts
    42
    Mentioned
    0 Post(s)
    Without seeing your code it is difficult to guess what you're doing wrong. It sounds to me like you're not clearing the screen after rendering a frame.

  9. #39
    EmuTalk Member
    Join Date
    Aug 2008
    Posts
    2
    Mentioned
    0 Post(s)
    I'm trying to upload a snapshot, but I'm getting an error message.
    Anyway, my basic code.

    void ramWrite( unsigned short int address, unsigned char byte ){

    siRam[ address ] = byte ;
    if( address > 0x2400 )
    siVram(address,byte);

    }

    //
    void siVram( unsigned short int address , unsigned char byte ){

    int posx, posy, color;
    posx = address>>5;
    color = address&0x1f;
    posy = ((address&0x1F)<<3);
    _putpixel32(Buffer,posx,255-((posy) ), byte&1 ? Overlay[color] : black );
    _putpixel32(Buffer,posx,255-((posy)+ 1), byte>>1&1 ? Overlay[color] : black );
    _putpixel32(Buffer,posx,255-((posy)+ 2), byte>>2&1 ? Overlay[color] : black );
    _putpixel32(Buffer,posx,255-((posy)+ 3), byte>>3&1 ? Overlay[color] : black );
    _putpixel32(Buffer,posx,255-((posy)+ 4), byte>>4&1 ? Overlay[color] : black );
    _putpixel32(Buffer,posx,255-((posy)+ 5), byte>>5&1 ? Overlay[color] : black );
    _putpixel32(Buffer,posx,255-((posy)+ 6), byte>>6&1 ? Overlay[color] : black );
    _putpixel32(Buffer,posx,255-((posy)+ 7), byte>>7&1 ? Overlay[color] : black );

    }

    void siIrq( unsigned short int address ){

    if ( inte ){

    inte=0;
    pushpc( pc ) ;
    pc = address ;
    //no need to decrement cycles
    }

    }

    main(){


    //my main loop. Just for test

    while(!key[KEY_ESC]){ //

    cpuRun( 17000 );
    siIrq( 0x0008 );
    blit(buffer,screen,0,0,0,0,224,256);
    clear_bitmap(buffer);
    //wrong way to clean
    cpuRun( 17000 );
    siIrq( 0x0010 );
    // audio/joystick update
    }


    }

    Looks like everything(except timing and sound) that was emulated is ok. But look the picture.



    using clear_bitmap(buffer):


    I don't now how to fix this bug. I don't understand the right way to work with vram and how to update the screen. The clear_bitmap(buffer) was the last attempt.
    Last edited by Antígeno; January 23rd, 2009 at 13:07.

  10. #40
    EmuTalk Member
    Join Date
    Feb 2005
    Posts
    8
    Mentioned
    0 Post(s)
    hi, i have been working on space invaders for a while now and i am just about finished, all that remains is that where the alien is supposed to come out to switch the y, it crashes, i have done some debugging and found that at an area where it is adding 20 to the h register pair, that its already to high at this point and causes it to go outside the boundaries of the memory array, would anyone know possibly why this happens?

    edit: i figured out the cause of the crash and fixed it. it would seem space invaders needs a minimum (at least mien did to work right) of 0x41B9 bytes of ram to function perfectly and have the alien fix the y without crashing. hope this helps anyone else working on space invaders.
    Last edited by swatgod; March 31st, 2009 at 15:38. Reason: update post

Page 4 of 9 FirstFirst ... 23456 ... LastLast

Similar Threads

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