Jump to content
  1. Atari Systems

    1. Atari General

      A general discussion for Atari-related topics that aren't covered by a specific Atari console or computer forum.

      20k
      posts
    2. Atari 2600

      The Atari 2600 is the system that started it all for Atari, and is by far the most popular classic gaming console. This forum covers all 2600 systems produced by Atari, as well as 2600-compatible consoles produced by third-parties.

      705.5k
      posts
    3. Atari 5200

      The Atari 5200 was Atari's second cartridge-based game console. Based on the Atari 8-bit computer line and labeled the "SuperSystem", the 5200 was Atari's answer to growing competition in a market they were losing control over.

      91.4k
      posts
    4. Atari 7800

      The Atari 7800 ProSystem is a contemporary of the Nintendo Entertainment System and the Sega Master System. Based on extensive feedback from Atari customers, the 7800 features a streamlined design, backward compatibility with the 2600, a powerful graphics processor, and simplified controllers.

      170.9k
      posts
    5. Atari Lynx

      Lynx was Atari's first portable game system, and world's first color handheld. It was designed by Epyx and the engineers who created the Amiga. Ahead of its time, the Lynx sported a backlit color screen, stereo sound (in model 2) and an impressive range of games. Check out our rarity guide or explore many games listed on Atari Gamer.

       

      73k
      posts
    6. Atari Jaguar

      Atari's last game console, the Atari Jaguar represented a huge leap in technology from previous offerings. Featuring a 64-bit architecture, the Jaguar had great potential, but its power was difficult to tap. Even then, many great games were released and the Jaguar has an avid fan base today.

      218.1k
      posts
    7. Atari VCS

      Discussion forum for the new Atari VCS console.

      18.8k
      posts
    8. Dedicated Systems

      Before Atari produced the famous 2600, they created many standalone consoles such as Pong, Speedway, and Stunt Cycle. Recently, Atari has been creating new dedicated consoles, such as the Atari Flashback.

      35.8k
      posts
    9. Atari 8-Bit Computers

      Atari's original 8-bit computer line, featuring the Atari 400, 800, XL, and XE series of computers. Powerful and well-engineered, the Atari 8-bit computers are still popular with fans today!

      682.9k
      posts
    10. Atari ST/TT/Falcon Computers

      Atari's next generation computer line, the Atari ST computers were based on the Motorola 68000 series chips, the same as the Macintosh at the time. The ST would also be followed by the TT and Falcon.

      65.7k
      posts
    11. Atari Portfolio

      The Atari Portfolio is a palmtop, IBM PC-compatible portable computer released by Atari in 1989, the world's first palmtop computer!

      545
      posts
  2. Classic Consoles

    1. Classic Console Discussion

      Discussion of classic gaming consoles outside the Atari realm.

      424.4k
      posts
    2. ColecoVision / Adam

      Coleco launched the ColecoVision in 1982, with the console quickly becoming popular due to its library of arcade ports. The ColecoVision has a large homebrew following today.

      132.1k
      posts
    3. Intellivision / Aquarius

      This forum is for discussion of the Mattel Intellivision, Atari's primary competitor against the 2600, as well as the Mattel Aquarius computer. Intellivision systems include the original Intellivision, Intellivision II, INTV III, and the Sears Super Video Arcade.

      279.5k
      posts
    4. Bally Arcade/Astrocade

      Discussion forum for the Bally Arcade/Astrocade console.

      3.7k
      posts
    5. Odyssey 2 / Videopac

      Discussion revolving around the Odyssey 2 / Videopac G7000/G7400

      7.7k
      posts
    6. Vectrex

      Discuss the world's only vector-based video game console here!

      12.2k
      posts
    7. Nintendo Entertainment System (NES) / Famicom

      Discuss Nintendo's first cartridge-based system, the NES, here!

      12k
      posts
    8. Super Nintendo Entertainment System (SNES) / Super Famicom

      Discuss Nintendo's second cartridge based system here!

      6.4k
      posts
    9. Sega Genesis

      Sega's popular fourth-generation 16-bit system, would ultimately compete head-to-head with the Super Nintendo.

      14.7k
      posts
    10. 3DO Interactive Multiplayer

      Discussion forum for the 3DO console and the unreleased Panasonic M2

      3.6k
      posts
    11. Dreamcast

      Discussion for the SEGA Dreamcast console.

      1.2k
      posts
    12. SMS High Score Club

      Join the Sega Master System High Score Club today!

      2.4k
      posts
    13. TG-16/PC Engine High Score Club

      Compete for high scores on the TurboGrafx-16 and PC Engine!

      1.4k
      posts
  3. Classic Computing

    1. Classic Computing Discussion

      Use this forum to discuss the plethora of classic computers outside of Atari 8-bit offerings. These include the Apple II, Commodore 64/128, Amiga, TI 99/4a, MSX, TRS-80 and others.

      41.2k
      posts
    2. Apple II Computers

      Discussion for Apple's 8-bit computer line.

      14k
      posts
    3. 237.7k
      posts
    4. Commodore 8-bit Computers

      Discussion for Commodore PET, Vic-20, Commodore 64, Commodore 128, and other 8-bit Commodore systems.

      17.4k
      posts
    5. Commodore Amiga

      Discussion for Amiga Computers, CDTV, and CD32

      7.8k
      posts
    6. Tandy Computers

      Discussion for Tandy computers, including the TRS-80 Models I, II, III, and 4, Color Computers, and Model 100.

      7.9k
      posts
  4. Modern Consoles

    1. Modern Gaming Discussion

      This forum is for discussion of all modern game systems, including gaming on consoles and computers.

      232.4k
      posts
    2. Sony Playstation 5

      Discuss Sony's Playstation 5 console here!

      851
      posts
    3. Xbox Series S/X

      Discuss Microsoft's latest Xbox Series S and X consoles here!

      723
      posts
    4. Atari VCS (Redirect)   (8,534 visits to this link)

      Discussion forum for the new Atari VCS console.

    5. Nintendo Switch

      Discussion about Nintendo's latest game console and games.

      10.1k
      posts
    6. Microsoft Xbox One

      Discussion forum for the Xbox One.

      3.3k
      posts
    7. Sony PlayStation 4

      Talk about the Sony Playstation 4 here.

      3.4k
      posts
    8. Microsoft Xbox 360

      Discussion about the Microsoft Xbox 360 (not including the original Xbox).

      22.4k
      posts
    9. Sony Playstation 3

      Please discuss the Sony Playstation 3 and games here.

      13.4k
      posts
    10. Nintendo Wii / Wii U

      Discussion forum for the Nintendo Wii and Wii U consoles and games.

      27.5k
      posts
  5. Gaming General

    1. Gaming General Discussion

      Gaming discussion not covered by other specific gaming forums.

      2.9k
      posts
    2. Arcade and Pinball

      Many of us grew up pumping quarters into arcade games, and here's where you can discuss all your favorites. From Pong to Pinball to the latest arcade games, if it has a coin slot, then you're at the right place!

      45.9k
      posts
    3. Emulation

      Emulators allow you to experience classic games on modern PCs (and other devices!) Discuss the latest emulator developments and ask questions about emulation here!

      31.7k
      posts
    4. Hardware

      This forum is for discussion of hardware at a more technical level than you'll find in the other forums. If you have a hardware question you'd like to ask or have some interesting knowledge you'd like to share with others, post it here!

      33.3k
      posts
    5. Prototypes

      Ever wondered about all those games that were announced but never released? Or games that have been discovered over the years that no one even knew existed? Or have you discovered a new prototype that no one's seen yet? Here's the place to talk about prototype games, led by Tempest of AtariProtos.com.

      16.5k
      posts
    6. Gaming Publications and Websites

      This forum is for discussion of gaming related magazines, books, websites, and other publications.

      19.9k
      posts
    7. International

      Internacional - Internazionale - Internationaal - Internasjonal - This forum is for discussion of classic and modern gaming in languages other than English.

      4.6k
      posts
  6. Marketplace

    1. Buy, Sell, and Trade

      Please use this forum as a tool to buy, sell, and trade games and hardware.

      241k
      posts
    2. Auction Central

      Use this forum to discuss auctions on eBay. Have something up for auction you'd like to share? Post it here! You can also highlight amusing, off-the-wall, or interesting auctions that others may want to hear about!

      170.5k
      posts
    3. Wanted

      Use this forum to post a list of the gaming hardware and software you're looking for!

      51k
      posts
    4. Free Games and More

      Spreading the Love with Free Games and other items.

      2.4k
      posts
    5. User Feedback Forum

      Please use this forum to leave feedback about other users on AtariAge that you've had good and/or bad experiences with. Please read the sticky at the top of this forum before posting!

      14.4k
      posts
  7. Community

    1. Events

      Use this forum to discuss gaming events of all types, including expos revolving around classic gaming, events catering to modern systems, arcade expos, and local gatherings of collectors getting together or a day of gaming.

      23.5k
      posts
    2. Show Us Your Collection!

      If you're a repeat visitor to AtariAge, it's likely you also collect classic games and systems. Here's your chance to show off to the rest of the community your collection!

      16.4k
      posts
    3. Member Blogs

      As members update their Blogs, messages will be posted in this forum so you can more easily keep tabs on who's writing what!

      11.9k
      posts
    4. 2.4k
      posts
    5. 6.7k
      posts
    6. Contests

      These forums are for discussing and participating in contests started by AtariAge, contests run by forum members, and of course, the weekly High Score Contests!

      15.3k
      posts
    7. User Groups

      This forum and its subforums are for classic gaming and computing user groups. Find people in your area who share your love of this hobby!

      2.7k
      posts
    8. AtariAge News Discussion

      Discuss news posted on the front page of AtariAge!

      • No posts here yet
    9. User Submitted News

      Please submit classic gaming news here!

      124
      posts
  8. Game Programming

    1. Homebrew Discussion

      Here you can talk about homebrew games that don't have their own forums allocated (which will be most of them). Have an idea for a game that you'd like to see someone program? Are you programming a game and want some feedback? Discuss it here!

      53.7k
      posts
    2. Programming

      The programming forums are technical discussions of programming various classic gaming consoles. The more popular consoles have their own dedicated programing forums, so please only use this forum for topics that fall outside of those forums.

      7k
      posts
    3. Hacks

      A hack is an existing game that has somehow been modifed in terms of graphics, colors, sounds, and/or gameplay. If you've modified a game and would like to share it with others, or have an idea for a modification you'd like to see done to an existing game, you can discuss it here.

      23.8k
      posts
  9. Site

    1. Announcements

      Important site or forum-related announcements will be posted here. If you see a new announcement, please stop by to read it!

      6.5k
      posts
    2. Forum Questions and Answers

      Have a question about how to use the forum?  Ask here and others can answer (including admins and mods!)  

      683
      posts
    3. AtariAge Store Discussion

      We'll post announcements about the AtariAge Store here, and you can also post your questions and comments about the store in this forum as well.

      326
      posts
    4. Site and Forum Feedback

      Do you have suggestions for how AtariAge can be improved? Please post them here, as well as criticisms, and kudos about the web site!

      17.5k
      posts
    5. Rarity Guide

      The AtariAge Rarity Guide is a living, breathing document! If you have feedback regarding rarity guide values and the database in general, please discuss it here!

      8.2k
      posts
    6. Archived Forums

      Resting place for forums that have have run their course and are archived here for reference.

      547
      posts
  • Recent Status Updates

    • dudeguy

      I was up late but I managed to come up with a formula for determining how much I need to sell a game for on eBay to walk away, breaking even, adjusted for inflation. I kept track of a lot of the games prices of what I originally paid for. Many of them I will have to just ballpark it. I'll come out either ahead or break even on a good chunk of my games, and lose my shirt on a handful of them. it's sad but unfortunately, life happens and bills need to get paid. I haven't touched a video game in months, it's just money sitting around collecting dust at this point. gonna take a long time to go through all of it
      1. This update has no replies.
    • Charlie Cat

      Jon trying to get a date Garfield? 
       

      1. This update has no replies.
    • 7800Knight

      Little Chocolate Donuts!
       
       
      1. RB5200

        Prefer little powdered donuts
      2. Hwlngmad

        The greatest advertisement for donuts ever.
    • x=usr(1536)

      The way that people talk about not being able to unsee something or require eyebleach is really amusing.  Right up to the point where you view something for yourself that nobody should ever have to.
       
      Evil is real and the people who practice it do not deserve breath.
      1. doctorclu

        Wow, whatever you saw, I'm sorry with you.
         
        There is some evil in this world.  Realized a different type tonight and in that I understand.
      2. x=usr(1536)

        I can't go into details because there is an ongoing investigation, but I have two words that describe the situation: human trafficking.
      3. doctorclu

        Happens a lot in this world.  So much so my work has a class on what to do when encountering a company we work with that has ties to such activity (and how to look for it). 
    • Living Room Arcade

      HOMEBREW ALERT! 🎉  Guys, you'd better check this out, you're NOT GONNA BELEIVE THIS...
      Ninja Kombat wip v03.1 DEMO
              
      1. This update has no replies.
  • Recent Posts

    • Innermost Secrets Of TI-99/4A by Randy Holcomb   This was originally a series of articles in the Computer Shopper, and it was reprinted in booklet format, and I didn't see any good copy of it on the Internet, so decided to test out my Canon MF3010 scanner in seeing how well it makes a PDF, as I have a number of printed items, including some of my own source code only in paper format, so I wanted to do a test run to see how well I can scan a number of pages and do an OCR if possible on them.   Looking forward to any experts out there on suggestions on what are good settings or software to use for the equipment I have which currently is just a Canon MF3010 and sadly can only manually do one page at time.   In the meantime, enjoy this PDF of this booklet which is good beginner guide to using the VDP and file DSR for assembly language programmers out there that want to get started coding on the TI-99/4a computers. 🥰 TI99-InnermostSecrets.PDF
    • Moved to Completed: Impossible Mission (Port) by Gisberto Rondinella @Nop90 | Video Only (20240319) No Public Binary | Declared Complete: Apr 17, 2024 | Listing Updated: Apr 18, 2024
    • In the food fight game they already had the Yardian character and now they change him for a girl? It seems to me that Atari is wrong with the character design in this game. They had to continue with the characters already created in this new generation. Even so, I will wait to see gameplays of the game to decide whether or not to buy the game.
    • Moved to Completed: MazezaM (A8 Port) by budgames @tonma | Final Binary (20240416) | Declared Complete: Apr 16, 2024 | Listing Updated: Apr 18, 2024
    • Do you take the wide sync setting enabled with the latest tink4k firmware?    
    • I will speak with @darryl1970 on how he would like to proceed on how and where to offer this as a digital rom later this year.   
    • Added to WIP: Anthony's Big Adventure (32K) by Phillip Roberts @phillip_roberts | Video Only (20240415) No Public Binary | Listing Updated: Apr 18, 2024
    • Hey, Lex here. Lately I've been working on an HDMA sample streaming engine for the SNES. How it works is every frame a certain number of bytes of sample data is uploaded to an HDMA table in ram. The HDMA table is located 0x7E1000 in work ram. The "bytesPerFrame" variable controls how many bytes of sample data are uploaded to the HDMA table every frame. The HDMA table: Each entry in the HDMA table is 5 bytes. One line count byte + four bytes of sample data. However, the first entry in the HDMA table is a bit different from the following entries. In the first entry of the HDMA table the byte after the line count byte is 0xE0. When this entry is HDMA'd, 0xE0 will end up in the SPC700 register $F4. When the SPC700 program receives 0xE0, that tells it to begin receiving HDMA data. So when 0xE0 is detected the SPC700 program will start receiving HDMA data every scanline. After byte 0xE0, the 16-bit bufferStartingAddress will be stored in the first entry. The bufferStartingAddress is the address of the current audio buffer in the SPC700's ram that the sample data will be written to. Every entry after the first entry has a line count of 1 followed by four bytes of sample data. The actual sample data is begins at address 0x038000 in the rom. Every scanline this HDMA table will transfer four bytes of sample data to the audio registers $2140,$2141,$2142 and $2143.       Here is the code for updating the HDMA table:   arch 65816 ;Use the SNES CPU architecture. lorom !sampleAddress = $00 !sampleOffset = $0E ;The current offset in the current bank of sample data. !bytesPerFrame = $08 !bytesSent = $10 !currentScanline = $12 !sampleEndAddress = $20 ;The 24-bit address where the sample ends. !bufferStartingAddress = $3C !comparisonValue = $3E ;The value the bufferStartingAddress will be compared to. 144 x some number. !hdmaTable = $7E1000 macro byteToTable() ;This macro will transfer a byte to the HDMA table. LDA [!sampleAddress],y ;Load a value from the sample data. ;This will load a byte from the address stored at direct page $00+Y. ;$00 holds the sampleAddress. ;The sampleAddress is the 24-bit address of the sample. ;To get the final address of the current byte of sample data you do this: ;[$00]+Y STA !hdmaTable,x ;Store the byte. INX ;Increment the offset in the HDMA table. INY ;Increment the offset in the sample data's current bank. ;Y here represents the current offset in the sample's data. endmacro ORG $009000 update_HDMA_table: REP #$30 ;16-bit A, X and Y. LDX #$0002 ;Load 2 into X. ;X here will be used as the current offset in the HDMA table. ;$7E1002 is where the bufferStartingAddress will be stored. ;So $7E1000+X gives you the address $7E1002, the address where ;the bufferStartingAddress is stored in the first entry. LDA !bufferStartingAddress STA !hdmaTable,x ;Store the !bufferStartingAddress to data bytes 2 and 3 of the first entry. ;The !bufferStartingAddress is the address where the current sample buffer ;is in the SPC700's ram. LDY !sampleOffset ;Load the sample offset into Y. ;The !sampleOffset is the current offset in the current bank of the sample's data in the ROM. LDX #$0005 ;X will be used as the offset in the HDMA table. ;Set X to 5 so that we skip the first entry. ;Since each entry has a format of line_count+4 bytes each entry in the HDMA table is 5 bytes. ;So entry 1 starts at offset 5. STZ $2140 ;Clear $2140. update_loop: ;The loop that sends data from the sample to the HDMA table. SEP #$20 LDA #$01 ;Set the linecount byte for the current entry. ;The linecount will always be 1 for every entry that is not the ;first entry. ;So the 4 bytes of this entry will be HDMA'd and then one line will be skipped. STA !hdmaTable,x ;Store it to the HDMA table. INX ;Increment the offset in the HDMA table. %byteToTable() ;Send data byte 1 to the table. %byteToTable() ;Send data byte 2 to the HDMA table. label: %byteToTable() ;Send data byte 3 to the HDMA table. %byteToTable() ;Send data byte 4 to the HDMA table. check_sampleOffset: ;Check if the sample offset is greater than 0x7FFF ;If it is zero, the negative flag has been set. CPY #$8000 ;Compare Y(currentSampleOffset) to 0x8000; ;If Y is 0x8000 this means that we've transferred all the bytes ;in the current 32KB bank of the sample data to the HDMA table and need to increment ;the bank of the sampleAddress and reset the sampleOffset. BCC check_EndBank ;Have we transferred all the bytes in the current bank of the sample data? No? Then branch. reset_sampleOffset: LDY #$0000 ;Reset the sampleOffset to zero, so we start reading data from the start of the next 32KB bank. STY $0E INC $02 ;Increment the bank in the sample data, so the program starts reading the next 32KB of sample data. ;Basically we move to the next 32KB of sample data. check_EndBank: ;Check if the current bank of the sample is the ending bank. SEP #$20 LDA $02 ;Load the bank of the current sample address. CMP $22 ;Compare it to the bank where the sample ends. BNE check_GreaterThan ;Not equal? Go to update_bytesSent check_EndOffset: ;Compare the current sample offset to the end offset. REP #$20 TYA ;Transfer the sampleOffset to A. CLC ADC #$8000 ;Add 0x8000 CMP $20 BCS update_bytesSent sendStopCommand: ;Send the "stop" command to the SPC700 so it stops playing the sample. SEP #$20 LDA #$5E STA $2141 ;Write 0x5E to the SPC700 to let it know to stop the sample. LDA #$01 STA $28 ;Set the "sampleStop" boolean to true. jmp Transfer_Y ;Jump to the end of the code. endless_loop: jmp endless_loop check_GreaterThan: ;Check if the current sample address bank is greater than the endbank LDA $02 LDA $22 BCS sendStopCommand ;If the sample address bank is greater than the end bank branch. update_bytesSent: REP #$20 ;8-bit A. LDA !bytesSent CLC ADC #$0004 STA !bytesSent ;Add 4 since we sent 4 bytes of sample data to the HDMA table. CMP !bytesPerFrame ;Have we sent all of the bytes for the current frame? BNE update_loop ;No? Then loop. leave: REP #$20 ;16-bit A. ;A has to be 16-bit because we're going to add the 16-bit bytesPerFrame value ;to the 16-bit bufferStartingAddress. LDA !bufferStartingAddress CLC ADC !bytesPerFrame ;Add the bytesPerFrame to the bufferStartingAddress. STA !bufferStartingAddress CMP !comparisonValue ;Compare it to the comparison value. ;The comparison value is the offset where the final audio buffer ends ;in the SPC700's ram. BCC Transfer_Y resetting: LDA $80 ;Reset the bufferStartingAddress to the address of the first audio buffer in SPC700 ram. STA !bufferStartingAddress Transfer_Y: TYA ;Transfer the new sample offset to A. STA !sampleOffset STZ !bytesSent ;Reset the bytes sent. SEP #$20 LDA #$DF STA $2140 ;Store a value of 0xDF to $2140 to let the SPC700 know the SNES CPU is done updating the HDMA table. RTS After a certain number of bytes of sample data have been transferred to the HDMA table; the engine waits for VBlank and then transfers the HDMA table. Once the HDMA table is transferred the byte 0xC0 is transferred to the SPC700 to tell it that the PPU is currently in VBlank. After the HDMA table has been transferred, the program waits until scanline 0. After waiting until scanline 0; the SNES CPU will wait for the SPC700 code to send a byte of 0xFF. When the SPC700 code sends a byte of 0xFF, this means that it has finished receiving the HDMA data. SPC700 program code: On scanline 1, the first four bytes in the first entry of the HDMA table will be sent to the audio ports. The first byte that ends up in $F4 will be 0xE0. Byte 0xE0 tells the SPC700 to start receiving HDMA data every scanline. The 16-bit bufferStartingAddress will end up in registers $F5 and $F6. The 16-bit bufferStartingAddress stored after the 0xE0 byte gets stored into zero page addresses $08 and $09. Remember, the bufferStartingAddress tells the program the address of the current audio buffer. After the bufferStartingAddress has been received, the source directory entry for sample 0 will be updated. The sample start address and the sample loop address are the same as the bufferStartingAddress. The source directory is at SPC700 ram offset 0x1000. Once the source directory has been updated, there is some timed to code to wait 26 cycles. After the 26 cycles the program will be on scanline 2.   After that, there is a timed loop for receiving the bytes for the current scanline's HDMA table entry and moving those bytes to the audio buffer. The loop for receiving bytes is always 65 cycles. There are approximately 65 SPC cycles every scanline.   Byte-storing loop: So the first that happens in the loop is you transfer the first byte of HDMA data to A. Then you move A to the audio buffer in the SPC700's ram. Then you increment Y. Y is used as an offset in the audio buffer here. Then you do the same thing for the other 3 bytes for the current scanline's HDMA tavble entry. After transferring all of the bytes for the current scanline's HDMA table entry to the audio buffer, the loop checks if the negative flag has been set. Once Y overflows from 0xFF to 0x00 the negative flag will be set. If Y overflows, it will reset to zero and the low byte of the audioBufferAddress will be incremented. If Y didn't overflow, there is some timing code and if the scanlinesLeft value isn't zero, the code loops. Since the SPC700 registers are only 8-bit, when the high byte of the audioBufferAddress exceeds 0xFF; the low byte has to be increased by 1 and the high byte has to be reset. When the "scanlinesLeft" variable has a value of zero, that means all the HDMA bytes have been transferred to the audio buffer.After that the loop bit and end it of the last BRR will be set. The "scanlinesLeft" variable tells you how many scanlines are left in the HDMA table. The initial "scanlinesLeft" value is calculated by taking the bytesPerFrame value and dividing it by the "bytesPerScanline" variable.   After all the HDMA bytes have been transferred, the loop and end bits are set for the last BRR block in the audio buffer.Here's the code for receiving HDMA data: arch SPC700 lorom ORG $028800 !scanlinesLeft = $0E !bytesPerScanline = $10 !bytesPerFrame = $D2 !sampleStopBool = $28 wait_DF: ;Wait for the SNES CPU to send a value of 0xDF. MOV A,$F4 CMP A,#$DF BNE wait_DF ;Once the SPC700 receives a value of 0xDF it knows that the SNES is finished updating the HDMA table. wait_5E: ;0x5E is a "stop" command. MOV A,$F5 CMP A,#$5E BNE scanlinesLeft stop: MOV !sampleStopBool,#$01 ;Set the "sampleStop" boolean to true. scanlinesLeft: PUSH X ;Save X for later. MOV X,#$04 MOVW YA,$D2 ;Divide the !bytesPerFrame by 4. DIV YA,X ;It is divided by 4 since the HDMA table will send 4 bytes every scanline. POP X INC A MOV !scanlinesLeft,A ;scanlinesLeft=!bytesPerFrame/4+1 wait_C0: ;Check if the PPU is in VBlank yet. MOV A,$F4 CMP A,#$C0 ;When 0xC0 arrives in $F4 that means that the PPU is in vblank. BNE wait_C0 wait_E0: ;Wait until the value 0xE0 is HDMA'd to $2140. ;When this happens the PPU is on scanline 0. MOV X,#$01 MOV A,$F4 CMP A,#$E0 BNE wait_E0 store_sample_offset: ;Store the initial offset where the sample will be in SPC ram. MOV $08,$F5 ;Store sample offset high byte. MOV $09,$F6 ;Store sample offset low byte. MOV A,$F5 MOV Y,$F6 PUSH A PUSH Y update_source_directory_hah: MOV $1000,A MOV $1001,Y MOV $1002,A MOV $1003,Y wait_26_cycles: ;Wait 26 cycles, after these 26 cycles the PPU will be on scanline 2. MOV Y,#$00 MOV Y,#$00 MOV Y,#$00 MOV Y,#$00 MOV Y,#$00 MOV X,#$01 MOV X,#$00 ;3 cycles INC Y MOV Y,#$00 ;4 cycles MOV Y,#$00 ;4 cycles MOV Y,#$00 ;4 cycles MOV Y,#$00 ;4 cycles MOV Y,#$00 ;4 cycles store_bytes: ;Store the HDMA'd bytes into SPC700 ram. MOV A,$F4 MOV ($08)+Y,A ;Move the first value. INC Y ;12 cycles MOV A,$F5 MOV ($08)+Y,A ;12 cycles INC Y ;Store the HDMA'd bytes into SPC700 ram. MOV A,$F6 MOV ($08)+Y,A ;Move the first value. INC Y ;12 cycles MOV A,$F7 MOV ($08)+Y,A INC Y ;12 cycles compare_Y: BNE wait_six_cycles ;4 cycles is_FF: INCW $09 ;6 cycles DBNZ !scanlinesLeft,store_bytes wait_six_cycles: MOV X,#$00 MOV X,#$00 MOV X,#$00 DBNZ !scanlinesLeft,store_bytes last_block: ;Calculate where the last block begins. POP A POP Y MOV $08,Y MOV $09,A ;Pull the offset from the stack. source_dir: MOVW YA,!bytesPerFrame ;Move the !bytesPerFrame to YA. CLRC ADDW YA,$08 ;bytesPerFrame+bufferStartingAddress = endOfBuffer. ;So to get the address where the the audio buffer ends you take the ;bytesPerFrame and add the bufferStartingAddress to it. MOVW !scanlinesLeft,YA ;Move the endOfBuffer position to $0A. SETC ;Set the carry flag. SBC A,#$09 ;Subtract 9. ;The last block starts 9 bytes before the address where the audio buffer ends. MOVW $80,YA check_sampleStop: MOV A,!sampleStopBool CMP A,#$01 BNE set_loop_bit set_end_bit: MOV Y,#$00 ;Clear Y. MOV A,($80)+Y ;Move the first byte of the last block to A. OR A,#%00000001 MOV ($80)+Y,A key_off_channels: MOV $F2,#$5C MOV $F3,#$FF loop: jmp loop set_loop_bit: MOV Y,#$00 ;Clear Y. MOV A,($80)+Y ;Move the first byte of the last block to A. OR A,#%00000011 MOV ($80)+Y,A send_FF: MOV $F4,#$FF ;0xFF is used to tell the SNES that we've fully transferred the HDMA'd bytes. wait_FE: ;Wait for the SNES CPU to send FE so we can continue. CMP $F4,#$FE BNE wait_FE MOV X,#$00 MOV $F4,#$00 ;Clear $2140. RET Going back to the SNES CPU code; the SNES CPU then receives a byte 0xFF, which tells it that the SPC700 is done receiving HDMA data.   Then the SNES sends a byte of 0xFE to the SPC700 to let it know that it has received the 0xFF byte. Then the SNES program loops.   Below I've included the source code and an example rom.   Also warning, the code only works on NTSC consoles so far and won't work on PAL consoles.   Using a custom song: To use a custom song, replace "sample.brr" with a 32KHZ BRR file. Then go into the command line, change to the location where you installed the source code and type "asar.exe main_streaming_code.asm HDMA_streaming_code.sfc". If you want to change the the address where the sample ends you will need to modify the sampleEndAddress which is stored at $20 in work ram. Also, the code doesn't support exLoRom currently, so your sample will need to be less than 4MB. You can use the code or modify the code however you like; however credit would be appreciated.   Song credits: "Adventures in Adventureland" Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 3.0 http://creativecommons.org/licenses/by/3.0/ Here's a youtube video showcasing the engine: https://www.youtube.com/watch?v=lFJHG2BTIN8 HDMA_streaming_code.sfc streaming_source_code.zip
    • Hi, I have been looking for a socket 478 motherboard with a PC/PCI connector for a little while for a win98 build in the hope of getting good DOS sound compatibility with a YMF924 PCI sound card and I have found this one which has a promising yet unlabeled connector next to the PCI slots. Can anyone confirm that this is indeed a 5pin SB-link compatible header? The motherboard in question is a Matsonic MS9337C for which I have not been able to find any documentation...
    • So cool I had to pause work, hook up my 7800, load this up (Harmony) and play it.  Really awesome.
  • Blog Entries

×
×
  • Create New...