Shop OBEX P1 Docs P2 Docs Learn Events
P2 Space Invaders - 8080 Emulation - Page 2 — Parallax Forums

P2 Space Invaders - 8080 Emulation

2»

Comments

  • cgraceycgracey Posts: 14,152


    I used to suppose so, too, but the whole thing is gated by the video interrupts.

  • ke4pjwke4pjw Posts: 1,155
    edited 2021-01-28 05:05

    Just a quick note for those that have the AV board on something other than P24, you will need to change line 576


    .av_base_pin  long  24

  • Wuerfel, they always move one invader at a time, what makes them speed up, is the fact that there are less for it to go through to loop round to move the same one again.

  • No Chip, it seems they can be pretty much any place ( although guessing not too close to the top )

  • The interrupts thing was perhaps an attempt to remove visible tearing of the sprites - the code mainly attempts to only move things on the side of the screen that's not currently being drawn. The two sides would be the top and bottom with the screen oriented in the normal way. The two interrupts both call the same "process game objects" routine, but within that routine it bails out if the beam is on the wrong side of the screen. The "move player" object is only called by one of the interrupts though.


    It's a bit lopsided because the 'half way across' interrupt fired at scan line 96. I'm not sure how the scan lines are numbered with respect to the visible scan lines, but the screen is 224 scan lines wide so I can't see 96 being exactly half way.

  • It isn't half way, it's just at scanline 96, but thankfully it doesn't matter which scanline it happens at, because the 8080emulator runs a hell of a lot faster than the real thing :D

  • RaymanRayman Posts: 14,646

    @Baggers Excellent work! I just tried it out today. Had a bit of a hiccup with the A/V basepin. Seems it was hardcoded in the driver and also defined twice at the top, at least in the version I downloaded from the top post.

    Anyway, I changed these lines to this:

    .av_base_pin    long    av_base 'in the vga driver 
    VGA_BASE_PIN  = av_base 'in the second con section
    
  • RaymanRayman Posts: 14,646
    edited 2021-02-02 00:40

    I tried to convert this from a pure assembly program to a Spin2 file that launched the assembly cogs.

    Haven't been able to make that work yet. If it worked, could add in USB keyboard input...


    Problem is that pure assembly uses absolute addresses whereas Spin2 with PropTool uses relative addresses.


    BTW: Is that 8x12 font actually used here?

  • Cheers @Rayman I noticed that hardcoded value also, which has now been fixed.

    Also, Chip and I have been working on the emulator, and we somehow managed to get the emulator all working inside cog RAM with $5014 bytes of hub RAM required for the emulator RAM, and the awesome thing is, in the COG we have intermingled a Composite display driver and the sample driver all into just the one cog!

    Can you guess why we wanted it all in one cog? I bet you can't

    Well, to show the true power of the P2 chip....

    Yes, now you can play 8 Space Invaders on ONE single P2 chip with 8 TVs and 8 sets of 4 buttons attached.
    We're going to try and make a set up with 8 displays and show a video of it working!
    Not sure how long it'll take to get that sorted, but we're working on it!

    Two AV/Boards can drive the Composite to 8 TVs, but we'll need to use different non standard P2 Edge parts for all the controllers :D and the other 6 audio out pins.

    currently 3 games run on the emulator, Space Invaders, Lunar Rescue and Space Invaders Part II, but I will see if there are any of the other arcade games that use that basic PCB modified in some way, so we can try and find 8 different games that use the same PCB to have 8 different games running at once, if not we can fall back to any of the 3 games running on each cog, which we can currently do.

    each cog can also change to any game at any time holding all 4 buttons at once to cycle the game.

  • TonyB_TonyB_ Posts: 2,178
    edited 2021-02-02 19:22

    @Baggers said:
    Also, Chip and I have been working on the emulator, and we somehow managed to get the emulator all working inside cog RAM with $5014 bytes of hub RAM required for the emulator RAM, and the awesome thing is, in the COG we have intermingled a Composite display driver and the sample driver all into just the one cog!

    Are you saying that your 8080 emulator needs hub RAM to work?

    Message written on Win98SE - brill!

  • BaggersBaggers Posts: 3,019
    edited 2021-02-02 17:43

    Yes TonyB_, that's where the 8080 has it's RAM in each instance running.

    Oh and I forgot to add that it can run as slow as 52Mhz emulating it.

  • @Baggers said:
    Yes TonyB_, that's where the 8080 has it's RAM in each instance running.

    Oh and I forgot to add that it can run as slow as 52Mhz emulating it.

    I meant to append "in addition to the 8080 code in hub RAM" in case you think I'm an idiot. The term "emulator RAM" was ambiguous. Anyway question answered, thanks.

  • There is no HUB code now for the 8080 emulator, managed to squeeze it all into COG and LUT RAM

  • RaymanRayman Posts: 14,646
    edited 2021-02-02 18:35

    This looks to be a list of compatible games:
    http://adb.arcadeitalia.net/lista_mame.php?game_sourcefile=8080bw.cpp&arcade_only=0&current_version=0

    Oops, that doesn't list space invaders...
    Maybe this one is better?
    http://adb.arcadeitalia.net/lista_mame.php?game_sourcefile=mw8080bw.cpp&arcade_only=0&current_version=0

    Doesn't list Balloon Bomber though, which I've read should work...

  • Cheers Rayman, will look at adding as many as these as possible :)

  • RaymanRayman Posts: 14,646

    I tried a few of these ROMs and appears there's more to it than just using different ROM files...
    A few of them show a screen that looks right, but are frozen...
    Here's what "tornbase" does

  • ColeyColey Posts: 1,110

    I think this might be a better list Rayman ;-)

    https://system16.com/hardware.php?id=629

    I have some success getting Balloon Bomber working but it crashes after a while.

  • RaymanRayman Posts: 14,646

    Cool, I remember "Space Laser". Was neat, but I died real fast...

  • cgraceycgracey Posts: 14,152
    edited 2021-02-03 23:07

    I just talked to Jim Bagley and he said he's got 17 different games' ROMs that run on the Space Invaders 8080 platform.

    He sent me this link, where 171 games that use this 8080 platform are covered:

    http://adb.arcadeitalia.net/lista_mame.php?game_sourcefile=8080bw.cpp&arcade_only=0&current_version=0

  • I still need to sort the IO ports for each game first, will hopefully have something VERY cool to show next Tuesday :D

  • Cluso99Cluso99 Posts: 18,069

    @Baggers
    I'm impressed. Looking forward to next Tuesday (Wednesday here) :)

  • cgraceycgracey Posts: 14,152

    We'll have the emulator running at under 40MHz soon.

  • RaymanRayman Posts: 14,646

    Any chance of getting this in Spin2+pasm2 mode?

    Could do more with it that way...
    Might be too late for that though. It's hard to move a big code from pasm2 to Spin2+pasm2...

  • cgraceycgracey Posts: 14,152

    @Rayman said:
    Any chance of getting this in Spin2+pasm2 mode?

    Could do more with it that way...
    Might be too late for that though. It's hard to move a big code from pasm2 to Spin2+pasm2...

    Once we have it done, it will be nothing to make it into a Spin object. No problem there.

  • Yeah once it's finished, it'll be really easy, as it fits in a cog, you point it to the RAM buffer, with some pin etc info before it and it's good to go

Sign In or Register to comment.