It is currently Thu Dec 14, 2017 7:21 pm

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 95 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
 Post subject: Re: Graphics in Excel
PostPosted: Sun Apr 19, 2015 11:05 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19345
Location: NE Indiana, USA (NTSC)
Khaz wrote:
I'm just wondering, why would I want to try to do that? If what I have seems to be natively in 30FPS (every frame is unique and seems an even time interval from the last)

I was assuming that the animation was produced for film. Anything produced for film is not natively in 30 fps, and every frame is not unique.

Quote:
Considering the Sega CD played the video inside a tiny box on screen, I'd say I'm already winning by a mile.

The Sega CD also fit the entire audio and video stream into 150 KiB/s, the data rate of single-speed CD-ROM.


Top
 Profile  
 
 Post subject: Re: Graphics in Excel
PostPosted: Sun Apr 19, 2015 11:37 am 
Offline
User avatar

Joined: Thu Dec 25, 2014 10:26 pm
Posts: 309
Location: Canada
tepples wrote:
I was assuming that the animation was produced for film. Anything produced for film is not natively in 30 fps, and every frame is not unique.

Now that I think about it, I wouldn't be surprised if they deliberately animated every frame of that video specifically to try to show off what the system would be capable of. Don't think the effort would have been all that worth it for the Sega CD, but nothing's ever going to beat the original CD-ROM version for PC I had with the DINO libraries and whatnot. It had some nice AVI files.
Quote:
The Sega CD also fit the entire audio and video stream into 150 KiB/s, the data rate of single-speed CD-ROM.

Fair enough. Was 1x really the best they could do at the time? I don't have a great grasp of the timeline but it feels like 1x was around for like, a month before they came out with 4x and 8x...


Top
 Profile  
 
 Post subject: Re: Graphics in Excel
PostPosted: Sun Apr 19, 2015 1:14 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19345
Location: NE Indiana, USA (NTSC)
The original PlayStation's drive was 2x (300 KiB/s). It also had MDEC hardware that decoded something similar to Motion JPEG.


Top
 Profile  
 
 Post subject: Re: Graphics in Excel
PostPosted: Sun Apr 19, 2015 5:14 pm 
Offline
User avatar

Joined: Thu Dec 25, 2014 10:26 pm
Posts: 309
Location: Canada
Mmmkay, so I have the video working now in 256x216 at 15FPS. Still processing the frames. I think I will be processing the frames for the rest of the month.

I only need two things to get this demo working properly: Massive storage space and MSU1 sound.

The MSU sound I've hit another roadblock. I'm trying to convert a .wav file into the correct format for it using wav2msu but it won't accept the input file. I ripped the .wav straight from my original Sonic CD CD with Windows Media Player, but it won't take that saying "Sound is not in PCM format". So I put it in audacity and export it again, now I get "Sample data not where it was expected". Does anyone know a program whose output wav2msu WILL accept?

As for the massive storage space for the video, I've made zero progress investigating that on my own. I understand that it can be done but I haven't the faintest clue how.

P.S. If I finish this demo, do you think I'll be allowed to post the audio file along with it without being sued by someone? Or will people have to build it themselves? I saw there's a Megaman X hack out there with MSU sound, but it doesn't provide the sound files sooo I don't see how anyone is supposed to play it.

EDIT: How come I always figure things out myself literally RIGHT after I complain and ask for help. Just converted it to .flac and it took that just fine. Now I just can't get it to work and I don't know what might be wrong.


Top
 Profile  
 
 Post subject: Re: Graphics in Excel
PostPosted: Sun Apr 19, 2015 6:05 pm 
Offline
User avatar

Joined: Thu Dec 25, 2014 10:26 pm
Posts: 309
Location: Canada
Okay. Don't know if anyone here has experience getting MSU1 to work but here's what I have so far...

I have code in my main program as follows:
Code:
.EQU MSU_STATUS      $2000
.EQU MSU_READ      $2001
.EQU MSU_ID      $2002
.EQU MSU_SEEK      $2000
.EQU MSU_TRACK      $2004
.EQU MSU_VOLUME      $2006
.EQU MSU_CONTROL   $2007

PlayMSUTrack:
   php

   sep #$20
   rep #$10

   ; WLA-DX
   lda #$FF
   sta MSU_VOLUME
   ldx #$0001   ; Writing a 16-bit value will automatically
   stx MSU_TRACK   ; set $2005 as well, so this is easy.
   lda #$01   ; Set audio state to play, no repeat.
   sta MSU_CONTROL
   ; The MSU1 will now start playing.
   ; Use lda #$03 to play a song repeatedly.

   plp
   rts

...with a "jsr PlayMSUTrack" right after the SNES is initialized.

I have in the same directory a scdtest-1.pcm file as track one, and a blank scdtest.msu file. I also have an .xml file copied right out of here:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<cartridge region="NTSC">

   <!-- This part depends on the ROM -->
   <rom>
      <map mode="linear" address="00-7f:8000-ffff"/>
      <map mode="linear" address="80-ff:8000-ffff"/>
   </rom>

   <ram size="0x2000">
      <map mode="linear" address="20-3f:6000-7fff"/>
      <map mode="linear" address="a0-bf:6000-7fff"/>
      <map mode="linear" address="70-7f:0000-ffff"/>
      <map mode="linear" address="f0-ff:0000-ffff"/>
   </ram>

   <!-- This is the important bit -->
   <msu1>
      <map address="00-3f:2000-2007"/>
      <map address="80-bf:2000-2007"/>
   </msu1>

</cartridge>

And for good measure I also have a manifest.bml file hacked out of the Megaman X example I mentioned earlier:
Code:
unverified

cartridge region=NTSC
  rom name=scdtest.sfc size=0x400000
  map id=rom address=00-7f,80-ff:8000-ffff mask=0x8000
   
  msu1
    rom name=scdtest.msu size=0x0000
    map id=io address=00-3f,80-bf:2000-2007
    track number=1 name=scdtest-1.pcm

information
  title: scdtest

Which oh my god contains formatting now that I paste it here but comes out as one solid line in notepad. Lousy windows.

Does anyone know why WLA outputs a ".smc" file when this seems to want a ".sfc" file? What's the difference there?

Anyways. No sound, not sure what to try next. I'm testing it in recent Bizhawk using bsnes v87


Top
 Profile  
 
 Post subject: Re: Graphics in Excel
PostPosted: Sun Apr 19, 2015 6:55 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19345
Location: NE Indiana, USA (NTSC)
Khaz wrote:
Does anyone know why WLA outputs a ".smc" file when this seems to want a ".sfc" file? What's the difference there?

The difference is supposed to be that .sfc is a ROM image, while .smc is a 512-byte header for floppy disk copiers followed by a ROM image. What is the size in bytes of the file that WLA produces?


Top
 Profile  
 
 Post subject: Re: Graphics in Excel
PostPosted: Sun Apr 19, 2015 6:57 pm 
Offline
User avatar

Joined: Thu Dec 25, 2014 10:26 pm
Posts: 309
Location: Canada
According to windows, 4.00 MB (4,194,304 bytes). Does this mean you can't use MSU1 on a ROM with a header?


Top
 Profile  
 
 Post subject: Re: Graphics in Excel
PostPosted: Sun Apr 19, 2015 6:58 pm 
Offline

Joined: Fri Jul 04, 2014 9:31 pm
Posts: 818
Khaz wrote:
As for the massive storage space for the video, I've made zero progress investigating that on my own. I understand that it can be done but I haven't the faintest clue how.

...MSU1?


Top
 Profile  
 
 Post subject: Re: Graphics in Excel
PostPosted: Sun Apr 19, 2015 6:58 pm 
Offline

Joined: Thu Aug 12, 2010 3:43 am
Posts: 1589
tepples wrote:
Quote:
Considering the Sega CD played the video inside a tiny box on screen, I'd say I'm already winning by a mile.

The Sega CD also fit the entire audio and video stream into 150 KiB/s, the data rate of single-speed CD-ROM.

Not to mention doing all the decompression in software, and early codecs were pretty bad at this (leading to tiny windows). Later games would fill nearly the entire screen though (case in point).


Top
 Profile  
 
 Post subject: Re: Graphics in Excel
PostPosted: Sun Apr 19, 2015 7:03 pm 
Offline
User avatar

Joined: Thu Dec 25, 2014 10:26 pm
Posts: 309
Location: Canada
93143 wrote:
Khaz wrote:
As for the massive storage space for the video, I've made zero progress investigating that on my own. I understand that it can be done but I haven't the faintest clue how.

...MSU1?

Is MSU1 the only way to get a rom of arbitrary size? I also thought it was more of a data streaming thing than a rom mapping thing.


Top
 Profile  
 
 Post subject: Re: Graphics in Excel
PostPosted: Sun Apr 19, 2015 7:07 pm 
Offline
User avatar

Joined: Mon Sep 15, 2014 4:35 pm
Posts: 3153
Location: Nacogdoches, Texas
Khaz wrote:
93143 wrote:
Khaz wrote:
As for the massive storage space for the video, I've made zero progress investigating that on my own. I understand that it can be done but I haven't the faintest clue how.

...MSU1?

Is MSU1 the only way to get a rom of arbitrary size? I also thought it was more of a data streaming thing than a rom mapping thing.

What's this "data streaming" thing though? From what I heard, it pretty much just effectively increases the total size a game can be, so there's enough space for the video. I imagine you could even make a game with a Metal Slug amount of tiles. I guess it has hardware to create the music signal though.


Top
 Profile  
 
 Post subject: Re: Graphics in Excel
PostPosted: Sun Apr 19, 2015 7:11 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19345
Location: NE Indiana, USA (NTSC)
I think the idea is that you use MSU1 to stream in the compressed data that your video codec decodes into pixels. In this way, it's like the cart interface of the Nintendo DS.


Top
 Profile  
 
 Post subject: Re: Graphics in Excel
PostPosted: Sun Apr 19, 2015 7:21 pm 
Offline
User avatar

Joined: Thu Dec 25, 2014 10:26 pm
Posts: 309
Location: Canada
Tried just cutting off the first 512 bytes of the ROM and renaming it .sfc. Caused an error in bizhawk but I've been there before so I just renamed everything and it fixed that, but now the program is clearly screwed so I guess I didn't just cut a header out.

I could just do MSU1 video streaming, but that's been done already and I'd be starting from scratch again, and really all I want is proof my method works. If I want to build a rom of arbitrarily large size, what are my options? All I need is maybe 10x the space I have right now to fit the entire video. If there's some way I can just map 10 roms and switch between them by writing to some register that would be ideal and it'd be hard to believe there's not several ways to do that by now.


Top
 Profile  
 
 Post subject: Re: Graphics in Excel
PostPosted: Sun Apr 19, 2015 9:54 pm 
Offline

Joined: Fri Jul 04, 2014 9:31 pm
Posts: 818
MSU1 video streaming has been done, yes, but not (AFAIK) with multi-palette 4bpp; I believe your method's combination of frame rate, picture size and colour depth is unprecedented on the SNES.

And I don't understand why you're worried about using the MSU1 for the video, if you're willing to use the thing for audio. All it really does is provide a 32-bit address space for data, and you can DMA out of it, almost exactly like you're doing now. The only other option I'm aware of is the S-DD1, which is supposedly capable of mapping 256 MB to $C0-$FF in 1 MB chunks, but I'm not sure why you would want to use the S-DD1 instead of the MSU1 when you're already using the MSU1... it's not like you need random access... okay, the hardware decompression is nice if you want a small filesize, but that's further from what you're doing now than the MSU1 is...

If you wanted to figure out how to stream BRR audio to the APU, you could eliminate the MSU1 entirely and only use "real" (ie: '90s vintage mass-produced) SNES resources for your video. But it just seems weird to eagerly leap on the MSU1 bandwagon for audio and then be leery of using the data capability of the chip you've already decided to include.

tepples wrote:
I think the idea is that you use MSU1 to stream in the compressed data that your video codec decodes into pixels.

You don't even need to compress it in this case. The memory space is large enough for more than two and a half hours of the described video format without any compression at all. You could DMA it straight into VRAM.

In fact, if my calculations are correct you could fit Star Wars into 4 GB, in cinematic widescreen at 30 fps, using the slightly heavier BG+sprites scheme, and have enough spare screen space and DMA bandwidth to render subtitles in hires mode below the video.

...

A Super Magicom header is mostly zeroes, and it goes on top of a whole multiple of 65,536 bytes. If your ROM is exactly 4 MB, it doesn't have a copier header. In practice, while .sfc does usually mean no header, .smc doesn't imply a header; it's just a name people are used to. When I got my copy of WLA DX it was set up to produce .fig files, of all things, and I changed it to .smc because I wasn't sure if the SNES header the code was plainly set up to include was a copier header or not (it wasn't)...


Top
 Profile  
 
 Post subject: Re: Graphics in Excel
PostPosted: Sun Apr 19, 2015 10:35 pm 
Offline
User avatar

Joined: Thu Dec 25, 2014 10:26 pm
Posts: 309
Location: Canada
93143 wrote:
If you wanted to figure out how to stream BRR audio to the APU, you could eliminate the MSU1 entirely and only use "real" (ie: '90s vintage mass-produced) SNES resources for your video. But it just seems weird to eagerly leap on the MSU1 bandwagon for audio and then be leery of using the data capability of the chip you've already decided to include.

Well, the main reason I definitely want the MSU1 for audio, unless I'm misunderstanding something, is that it should output the raw .wav sound whereas BRR is by definition introducing losses to that sound quality. I guess I hadn't really looked enough at exactly what the MSU1 does for data and I should give it a try though.

Haven't figured out why the sound isn't working. I really have nothing to go on with regards to what should be in the xml or bml files or how you even issue commands, I'm just basically copying that one site.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 95 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group