Jump to content

MachineCode

Member
  • Posts

    355
  • Joined

  • Last visited

  • Feedback

    100%

Posts posted by MachineCode

  1. 21 minutes ago, RH said:

    No problem with the JS.  Language doesn't matter.  My solution was quite similar to this.  Hint line #1 can be simplified. Alternatively (depending on the language you are using) you can drop the first if, and turn last two "if" checks to be straight if-blocks, and once you're done writing "Fizz" and/or "Buzz", just write a new line... but that wasn't my solution.

    Now I'm curious as I can think of like 4 solutions to the problem that spring to mind immediately without any extra thought. Just had this one pop in a second ago.

    let text = ""
    
    if (!(num % 3)) {
      text += "Fizz "
    }
    
    if (!(num % 5)) {
      text += "Buzz"
    }
    
    console.log(text.trim())

     

  2. 21 minutes ago, RH said:

    I'll post my solution a bit later.  My answer actually landed me the position at a major bank.  I was actually shocked that my answer wasn't a more obvious solution.

    Doing a simple if statement block?

    if (!(num % 3) && !(num % 5)) {
    	console.log("Fizz Buzz")
    } else if (!(num % 3)) {
      	console.log("Fizz")
    } else if (!(num % 5)) {
      	console.log("Buzz")
    } else {
      console.log("Neither Fizz nor Buzz")
    }

    PS: Sorry for the JS, I was just writing some so that's what I decided to use.

  3. Such a tough choice. I went MK64 due to it being my favorite Mario Kart until 8, but DKR is an excellent game that really needed a sequel. Gotta respect that DKR used Full 3D character models vs the pre rendered sprites of MK64. Although, I do love pre rendered 3d sprites a la Mario RPG and DKC. 

  4. 9 hours ago, Kguillemette said:

    Anyone ever watch Chernobyl? That's what it feels like going out and about right now.

    It really kinda does, doesn't it. It's fuckin crazy. 

    Re: I only did 2 episodes of it. Everyone being super British kinda took me out of it. Like I didn't want them to be like Boris and Natasha caricatures of Russians, but when you see British TV actors whom you've seen on other shows seeming not much different from their normal work, it kinda throws it off. I was basically expecting the first cases of radiation poison to be dismissed as a case of the collywobbles.

  5. Given: Christmas 93, RHCP - Blood Sugar Sex Magik, Pearl Jam - Vs., STP - Core, Billy Joel - River of Dreams, along with a sony cd boombox.

    1st Bought: Pearl Jam - Ten, Late 1993 - Early 94 at either The Wall in my local mall or Nobody Beats The Wiz as they were like 10 bucks there but didn't have the Lifetime Guarantee like the Wall. Wanted Jeremy and was disappointed that it wasnt on Vs. despite otherwise liking the album.

    • Like 1
  6. On 4/11/2020 at 11:52 AM, Hammerfestus said:

    Replace that singer and you’re solid.

    We get polar opposites of mixed reviews with him. Some people straight up love him and that's their draw, and other people don't like him much at all. The ones who don't tend to find him a bit too nasally. Part of that is the recording as the dude used way too bright of a signal chain for his type of voice, but he is also naturally a bit on the nasal side so I can totally see that.

     

    Anyway, I'm hoping we get some more music on here as we seem to have quite a few musicians, and the music debates show a wide range of tastes and styles so I figure it could be interesting. 

  7. Hey all,

    I noticed that we have quite a few musicians on the forum here, but don't have dedicated thread where we can share our work. Old or new, as long as it was made in part by you, share it here. I'll get the ball rolling.

     

    image.png.eee09db53102b53fd56fc923a7b5bea3.png

    Spotify: Heavy Handed - Old Adventures in Lo-Fi

     

    Heavy Handed is a punk band that I joined over the summer whose lead guitarist I replaced. He basically recorded this, did a terrible job, and then sat on the tracks. So, the band sent em to me to clean up and overdub all the rhythm guitars. Not the greatest sounding thing, due to the poor quality tracks, but came together more than good enough for punk rock. Thus the album name and the GameBoy graphics theme.

    Despite all this, I enjoyed working through the obstacles and making all the graphics in order to put out 3 IMO solid and heavy tunes.

     

  8. 7 hours ago, toma said:

    It may actually be easier for you to convert to metatiles before handling scrolling. That way you can create a routine that works with what you want instead of writing something, throwing it out, and writing it again. Writing a routine that draws a single metatile to the screen on each frame as you move forward is actually a pretty intuitive way to get started with scrolling as the timing works out pretty nicely.

    Each metatile is 16 pixels wide. The NES can display 16 metatiles wide and 15 metatiles high. That means if you scroll by one pixel, drawing at least one 2x2 metatile per frame will be fast enough to keep up with your movement. For vertical scrolling, draw the metatiles in rows. For horizontal, draw them in columns and skip every 16th frame. If you want to move faster, draw at least as many metatiles as you are advancing in pixels. That'll give you a basic scrolling engine to start out with. Just make sure to update the attributes as you go.

    If you're set on doing it with uncompressed levels, you can do it using the same logic, drawing rows or columns of tiles as you move. You'd need to draw 4 tiles for every pixel that you move forward, making sure to update attributes of course. Metatiles are just really convenient to work with when it comes to the attribute tables because they line up perfectly.

    I get what you are saying about creating a routine I'm actually going to keep, but I'm intentionally making a throwaway. For me, this is purely an academic exercise to help me truly understand what's going on. I'll post some code and then try and be more specific with my hang up.

    So right now, I have 2 bg files that I .incsrc into the main file that contain the name and attribute table data for each one. One looks like this:

     

    background:
      .db $00,$00,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 1
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$00,$00  
    
      .db $00,$01,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 2
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$00,$01  
    
      .db $00,$02,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 3
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$00,$02  
    
      .db $00,$03,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 4
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$00,$03  
    
      .db $00,$04,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 5
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$00,$04  
    
      .db $00,$05,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 6
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$00,$05  
    
      .db $00,$06,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 7
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$00,$06  
    
      .db $00,$07,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 8
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$00,$07  
    
      .db $00,$08,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 9
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$00,$08  
    
      .db $00,$09,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 10
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$00,$09  
    
      .db $00,$0A,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 11
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$00,$0A  
    
      .db $00,$0B,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 12
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$00,$0B  
    
      .db $00,$0C,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 13
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$00,$0C  
    
      .db $00,$0D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 14
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$00,$0D  
    
      .db $00,$0E,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 15
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$00,$0E  
    
      .db $00,$0F,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 16
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$00,$0F  
    
      .db $01,$00,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 17
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$01,$00  
    
      .db $01,$01,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 18
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$01,$01  
    
      .db $01,$02,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 19
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$01,$02  
    
      .db $01,$03,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 20
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$01,$03  
    
      .db $01,$04,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 21
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$01,$04  
    
      .db $01,$05,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 22
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$01,$05  
    
      .db $01,$06,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 23
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$01,$06  
    
      .db $01,$07,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 24
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$01,$07  
    
      .db $01,$08,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 25
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$01,$08  
    
      .db $01,$09,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 26
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$01,$09  
    
      .db $01,$0A,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 27
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$01,$0A  
    
      .db $01,$0B,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 28
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$01,$0B  
    
      .db $01,$0C,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 29
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$01,$0C  
    
      .db $01,$0D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D  ;;row 30
      .db $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$01,$0D  
    
    attributes:
      ; BR BL TR TL
      ;     TopLeft                                                                     TopRight
      .db %00010000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %01000000
      .db %00110010, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %11001000
      .db %00010000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %01000000
      .db %00110010, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %11001000
      .db %00010000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %01000000
      .db %00110010, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %11001000
      .db %00010000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %01000000
      .db %00110010, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %11001000

    So in here I just have raw tile and attribute data that I loop over using the whole 16bit pointerHi/Lo method to fill the nametable. I understand completely how this method of holding background data in a file works. Each 2 line chunk being a row of 32 tiles starting from the top and going left to right per row for 30 rows. I also understand the attribute portion for setting the palettes for the 2x2 tile chunks and how each byte controls the palette selection for a 2x2 set of 2x2 tile chunks with every 2 bits controlling a separate quadrant. The concept of incrementing the counter by 32 combined with a horizontal offset in order to reference this as columns makes sense to me.

    The issue I'm having is that I'm currently using a separate file per screen, and loading them separately into their respective nametables using a system of 4 loops (2xNT, 2xAT) prior to enabling NMI and starting the game loop, and then just incrementing the scroll register once per v-blank, checking each time if the scrollX position has rolled over so I can swap the nametable bit in PPU_CTRL and have a seamless loop. This is fine but not ideal for 2 screens, but I just don't get how I would store in a single file the tile map data for multiple screens and their attributes. I know I can do a label per screen but I want to have multiple screens under 1 label and be able to just scroll until I run out of background data and loop back around.

    So I guess question 1 is what is the multiple screen equivalent of the raw tile/attribute byte storage method I have above? And question 2 would then be about continuously scrolling through, although I feel like if I knew how the data was stored I wouldn't have too much of an issue figuring out the column based bg data method of rendering.

  9. Hello fellow quarantees. Like I'm sure some of you are doing, I've been using this odd downtime to further my NESDev/6502 ASM skills. I've gotten to a point where I can render and move sprites around, render backgrounds, and scroll both vertically and horizontally (not at the same time) to loop between 2 backgrounds. I understand how to store tile and attribute data for individual backgrounds as the starting from the top and going left to right until the bottom format makes sense to me. I'm having trouble wrapping my head around storing full levels or at the very least more than 2 BGs at a time as a singular entity.

     

    I tried the "Nerdy Nights" lesson where it scrolls across part of the first level of Mario in a loop. It comes with 2 .bin files that contains the level and one for the attributes. Unlike my standard background asm files, it's just raw hex data so I opened it in a hex editor but the layout of the tiles didn't quite make sense to me. It seemed to no longer use that Top Left, line by line to the Bottom Right format. Can someone explain to me just how to store a Raw Uncompressed set of backgrounds? I realize this isn't ideal and will absolutely change to a metatile based approach and eventually other compression formats, but I just can't seem to understand those without knowing how to lay it all out without compression. I'm one of those people who likes to really know a concept inside and out and benefits greatly from that in the long run, so any help here is greatly appreciated. My goal is to get this down so that I can eventually make my own level editing tools to speed up the process.

  10. On 3/5/2020 at 2:00 AM, ErickRPG said:

    my 940e is 24ms which is pretty darn good by LED standards.  But with how popular retro gaming is some company should start making small CRT's again.  Something along the lines of Sony's PVMs.

    Or, Prysm should make a standard def LPD and then we can have the best of both worlds. Thinner, lighter, raster scanning, phosphor glow, no input lag, low energy consumption, and a much cleaner manufacturing process. But I'd be cool with a new CRT too.

  11. On 2/6/2020 at 6:36 PM, TylerBarnes said:

    I wrote my own encoder in 6502 assembly. It is an NES rom that take a single screen .nam file and stores the encoded hex in RAM. I unfortunately don't know any other programming languages. 

    Now that's something. Writing your NESDev tools to run on the NES itself. Awesome.

    • Like 1
  12. In the early 90's as a group, my neighbors, my brother and I used to play this and Zelda II together and apart and kinda share our findings with no help from strategy guides or magazines. Come '93 (I'm around 7 at this point) we had all gotten to Death Mountain and I was the 1st to finish it. None of us actually grabbed the red ring either as we didn't veer off into the area where it was hidden. For Zelda II we all got to the 6th dungeon and got the special ability to see in the ghost town, but none of us beat it until I did in college in the mid 2ks.

    One fun thing I figured out was how to get the power bracelet as the first or second item (depending on if you grabbed the sword) in the game by going through the lost woods and circling all the way around. Fun times.

    It's kinda crazy how my finishing the game was like a big deal in my grade to the point where people didn't believe it. Like someone had me over their house to make me do this in front of them as everyone played it but nobody finished and then was like telling everyone at recess like "Dude, he did it right in front of me!"

    • Like 2
  13. 9 hours ago, TDIRunner said:

    I actually get what you are saying, but at this point in my life, it's not going to be enough to get me to watch it.  There are way too many things I need to watch first.  

    I've seen In the Army Now and Bio-Dome, so I think I've seen enough Paulie Shore in my lifetime.  

    Edit:  I've also seen Son in Law.

    You should give this one a shot. The other stars and supporting cast tend to balance him out a bit.

  14. 7 hours ago, Jeevan said:

    Every bit of this is disgusting 🤣.  I don't believe I would try any of it.  IMO guts aren't made for eatin.  But to each their own.  Like I said, my wife likes Chicken liver/gizzard fried.

    Everything up to and including raw oysters and clams is actually really good IMO. The rest I enjoy with the exception of the final 3. Those were more Andrew Zimmern type affairs for me.

    • Like 1
×
×
  • Create New...