Doom for Nintendo 64

Discussion in 'Nintendo Game Development' started by jnmartin84, Jul 3, 2014.

  1. jnmartin84

    jnmartin84 Robust Member

    Joined:
    Nov 11, 2013
    Messages:
    236
    Likes Received:
    31
    No worries, it is a common mistake. :)
     
  2. jnmartin84

    jnmartin84 Robust Member

    Joined:
    Nov 11, 2013
    Messages:
    236
    Likes Received:
    31
    I've picked up working on this again. I am implementing "network" multiplayer using the USB port on the 64Drive to communicate with a network bridge based on ZeroMQ. I'm working out the communication protocol now and have stubbed out the USB send/recv in the 64Doom codebase. If the Everdrive 64 allows programmer access to send and receive data over USB, I should be able to implement it for that cart as well, and it would be compatible with the 64Drive version out-of-the-box seamlessly due to the PC bridge interface being identical for any platform that can send and receive arbitrary buffers of data over an arbitrary comms interface to a PC. More soon.
     
  3. jnmartin84

    jnmartin84 Robust Member

    Joined:
    Nov 11, 2013
    Messages:
    236
    Likes Received:
    31
  4. jnmartin84

    jnmartin84 Robust Member

    Joined:
    Nov 11, 2013
    Messages:
    236
    Likes Received:
    31
  5. Narann

    Narann Member

    Joined:
    Jun 17, 2014
    Messages:
    10
    Likes Received:
    0
    Wow! Does it mean PC player VS N64 players? o_O
     
  6. jnmartin84

    jnmartin84 Robust Member

    Joined:
    Nov 11, 2013
    Messages:
    236
    Likes Received:
    31
    Not in a way that will be enjoyable. In order to get functioning multiplayer working in 64Doom I had to hack it into the original iD GPL-release Linux Doom code. To get that playable I did a bunch of code hacks to make it build in Cygwin. To test it, you have to run Windows in 256-color mode to force Cygwin/X server to run in 8-bit color mode and the color palette doesn't work correctly so it looks stupidly ugly as in the attached screenshot above. Also there is no sound.

    I needed to get it working on the PC side as quickly as possible for development and testing purposes, so those issues will never be resolved.
     
    Last edited: Oct 18, 2016
  7. jnmartin84

    jnmartin84 Robust Member

    Joined:
    Nov 11, 2013
    Messages:
    236
    Likes Received:
    31
    However, my networking protocol is simple and based on open-source technologies so it wouldn't be impossible for someone to implement it on a better port's codebase as long as it isn't one that breaks compatibility with the last official version (1.10?).

    I'm really only interested in the 64Drive-to-64Drive use case personally anyway to stsrt. If I get that working and can get some sample USB comms code for the Everdrive64 I will implement it for that platform as well so that at least people with those USB-capable carts can play together.

    All of my source is open and available due to working on a GPL2 code base anyway so anyone is free to take it and make it do more things in the future.
     
  8. jnmartin84

    jnmartin84 Robust Member

    Joined:
    Nov 11, 2013
    Messages:
    236
    Likes Received:
    31
    I got bored so I did this.
     

    Attached Files:

    • emu5.png
      emu5.png
      File size:
      165.8 KB
      Views:
      618
  9. jnmartin84

    jnmartin84 Robust Member

    Joined:
    Nov 11, 2013
    Messages:
    236
    Likes Received:
    31
    Note: This is never going to be a real project with a release. I needed something to refocus my energy because the 64Doom networking stuff was going nowhere. I ported Genesis emulator code I wrote for Dreamcast in 2002 to see if it works. Sprites don't and it runs at seconds per frame. Just a late night boredom diversion.
     
    Borman and Mystical like this.
  10. jnmartin84

    jnmartin84 Robust Member

    Joined:
    Nov 11, 2013
    Messages:
    236
    Likes Received:
    31
    USB multiplayer went nowhere.

    However, I pulled together much faster (5x) versions of memcpy and memset that made a huge performance improvement. Game play in low detail mode is faster than any pre-Xbox home console port at this point, rivals playing Doom on a Pentium computer now. Working on releasing a new binary after I fix the broken controller pak save game code.
     
    Borman likes this.
  11. kuze

    kuze Peppy Member

    Joined:
    Sep 28, 2011
    Messages:
    371
    Likes Received:
    6
  12. jnmartin84

    jnmartin84 Robust Member

    Joined:
    Nov 11, 2013
    Messages:
    236
    Likes Received:
    31
    Just grabbed a fresh-from-Github copy of g_game.c, re-writing the entire save game stack.

    Again.
     
  13. jnmartin84

    jnmartin84 Robust Member

    Joined:
    Nov 11, 2013
    Messages:
    236
    Likes Received:
    31
    Borman likes this.
  14. jnmartin84

    jnmartin84 Robust Member

    Joined:
    Nov 11, 2013
    Messages:
    236
    Likes Received:
    31
    Save games are still iffy, sometimes an exception is thrown when you save a game and then later try to load a game (you'll know if this happens because you'll see a blue screen with white text of a full register dump). If that happens, reset the console and try loading it again. Something about the way save and load interact, some memory is getting corrupted and I haven't finished tracking down the issue yet.
     
  15. jnmartin84

    jnmartin84 Robust Member

    Joined:
    Nov 11, 2013
    Messages:
    236
    Likes Received:
    31
    Hey Borman how's it going
     
  16. Borman

    Borman Digital Games Curator

    Joined:
    Mar 24, 2005
    Messages:
    9,543
    Likes Received:
    1,880
    Very well :p I dont have my 64 out right now, otherwise Id be making a video for you hah
     
  17. jnmartin84

    jnmartin84 Robust Member

    Joined:
    Nov 11, 2013
    Messages:
    236
    Likes Received:
    31
  18. jnmartin84

    jnmartin84 Robust Member

    Joined:
    Nov 11, 2013
    Messages:
    236
    Likes Received:
    31
    Just got to the point where my new computer is up and running and I am building the N64 cross-compiler toolchain with libdragon's "build" script. Here we go!
     
  19. jnmartin84

    jnmartin84 Robust Member

    Joined:
    Nov 11, 2013
    Messages:
    236
    Likes Received:
    31
    I'm currently working on a PSX Doom style hardware renderer utilizing the RDP.

    I've intercepted the Doom rendering core (R_DrawColumn / R_DrawSpan) and will use the information provided through their setup to hardware render with the RDP a textured quad for each column and span to be drawn. These quads are all 1 pixel by N pixels in dimension (N wide for spans, N tall for columns).

    My first test to make sure I had hooked in the correct places software-rendered a solid colored line onto the screen using the first color of the pixel for all columns and spans. I've attached three pictures. The first two are taken from MESS. The first was columns only, the second both.
    0254.png 0255.png
    The third is cell phone camera snap of it running colums and spans on a real N64 on my TV.
    sw_render_64doom.jpg

    I am now working to implement RDP rendered solid colored quads per column / span to mimic the software rendered examples above. I will then add textures into the mix.
     
    Borman likes this.
  20. jnmartin84

    jnmartin84 Robust Member

    Joined:
    Nov 11, 2013
    Messages:
    236
    Likes Received:
    31
    Software-textured quads for columns and spans.

    Do not have scaling accounted for in the columns yet. Getting completely wrong texels in the span textures currently and also not scaling it properly.

    0256.png
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page