It is currently Sat May 27, 2017 8:00 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 45 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: Thu Mar 16, 2017 7:23 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18361
Location: NE Indiana, USA (NTSC)
Bregalad wrote:
Interesting. I am however surprised by the lack of "features", i.e. have to require to game-specific hacks for raster timing and playing OGG files for audio. It sounds quite chep, there's probably some emulators with GNU licences allowing re-use without asking anyone for permission... or isn't there any ?!

There are plenty, such as FCEUX, Nintendulator, and Nestopia. It's just that most are copylefted, and copyleft requires distribution of complete corresponding source code for the emulator.

Sour wrote:
There is so much information, even on the wiki (How many times have you read "FCEUX's code does this", "Nestopia's code does that" while reading the wiki?) that is extracted from the source of current GPL-licensed emulators

Mostly I've seen that in descriptions of obscure Japan-only mappers. (If an article that isn't about a Japan-only mapper uses "FCEUX's code does this", let me know and I'll evaluate it.) If a particular mapper implementation is the only GPL code in your project, and you remove that mapper from a branch of an emulator designed to support only a particular game that does not use that mapper, you no longer have to release your emulator under GPL. This means you can make a GPL version with all mappers and a permissive or LGPL version with few mappers, much as FFmpeg does with its configuration switches that enable use of GPL libraries.

Sour wrote:
that it pretty much makes it impossible to not release an emulator as GPL (unless you just ignore the license's restrictions).

Copying an idea, process, or method of operation, as opposed to its expression, is not restricted by copyright. This means that if a particular piece of hardware is observed to do something, and the sequence and structure of your code is determined by that behavior, and you don't copy variable names or other "window dressing", it does not infringe.


Top
 Profile  
 
PostPosted: Thu Mar 16, 2017 8:52 am 
Offline

Joined: Sun Feb 07, 2016 6:16 pm
Posts: 198
tepples wrote:
Mostly I've seen that in descriptions of obscure Japan-only mappers.
Yes, I was mostly referring to those as well - I should have been clearer.

tepples wrote:
Copying an idea, process, or method of operation, as opposed to its expression, is not restricted by copyright. This means that if a particular piece of hardware is observed to do something, and the sequence and structure of your code is determined by that behavior, and you don't copy variable names or other "window dressing", it does not infringe.
Oh I see, I always interpreted "derived works" as being anything derived from the GPL code (be it code or knowledge). I'm clearly not a lawyer, though. Thanks for the information, I'll keep that in mind! Anyway, enough off-topic discussion from me :)


Top
 Profile  
 
PostPosted: Thu Mar 16, 2017 4:53 pm 
Offline
User avatar

Joined: Tue Mar 07, 2017 4:25 pm
Posts: 29
Location: Ohio, USA
I have the project all set up and building, however I believe there are some files missing from the assets. The Dushlan module is looking for font/gameover.png & font/gameover.fnt, however they seem to not be included. My local.properties seems to be in order, have I missed setting something up? I can always substitute them with my own, but I just want to make sure. Thanks!


Top
 Profile  
 
PostPosted: Thu Mar 16, 2017 6:15 pm 
Offline
User avatar

Joined: Sun Nov 09, 2008 9:18 pm
Posts: 812
Location: Pennsylvania, USA
I think I forgot something that was ignored for future check ins but is an integral part of the build. I'll fix it soon.


Top
 Profile  
 
PostPosted: Fri Mar 17, 2017 5:49 am 
Offline
User avatar

Joined: Sun Nov 09, 2008 9:18 pm
Posts: 812
Location: Pennsylvania, USA
Fixed. Forgot to include android/assets, which is ignored because game assets are copied there (this directory is re-used by android and desktop projects) temporarily, but several files need to remain there (font, palette, shaders) etc.


Top
 Profile  
 
PostPosted: Fri Mar 17, 2017 10:21 am 
Offline
User avatar

Joined: Tue Mar 07, 2017 4:25 pm
Posts: 29
Location: Ohio, USA
Works perfectly now.


Top
 Profile  
 
PostPosted: Sat Mar 18, 2017 8:54 am 
Offline
User avatar

Joined: Sun Nov 09, 2008 9:18 pm
Posts: 812
Location: Pennsylvania, USA
Live CHR-RAM streaming is now supported. I added a test rom for demonstrating the capability. It works best on PC systems.


Top
 Profile  
 
PostPosted: Sun Mar 19, 2017 1:50 pm 
Offline
User avatar

Joined: Sun Nov 09, 2008 9:18 pm
Posts: 812
Location: Pennsylvania, USA
GradualGames wrote:
tepples wrote:
Would it help to use a pixel shader for palette lookup so that you don't have to store eight copies of the pattern table in memory at once?


I actually do use a fragment shader to interpret the textures I'm generating, which does perform a palette lookup on a texture that is 32 pixels wide by 1 pixel tall. I actually encode the pixel value, attribute, and bg or spr in the rgb values of the actual textures. Without the shader turned on, everything looks sickly greenish/red/blue hues, haha.

I've been trying to think of a way to delegate all of the ppu decoding to the shader since that is performed in parallel on the gpu for each pixel (afaik), however the bandwidth needed for uploading 8k to the gpu every frame, though small, might be prohibitive? I'm not sure. #longtermgoals. It'd be neat if I could get that to work though, because then suddenly live CHR-RAM updates would be possible. Right now, I can only support it during transitions.


I was able to figure out how to delegate selection of background or sprite palettes as well as attributes entirely to the shader, so I do not have to duplicate textures anymore. This has the added benefit of making the new CHR-RAM streaming feature 4x faster.


Top
 Profile  
 
PostPosted: Tue Mar 21, 2017 7:16 pm 
Offline
User avatar

Joined: Sun Nov 09, 2008 9:18 pm
Posts: 812
Location: Pennsylvania, USA
iOS builds work now. .ogg files do not play back on iOS, so I will have to convert Dushlan's assets to .mp3, but I was able to test with one of my own games. Works very well, same smooth 60fps as PC. No tearing, no stuttering. *edit* this just in. These results are also true on an iPad 2nd gen. That's pretty good news ;)


Top
 Profile  
 
PostPosted: Fri Mar 24, 2017 5:57 am 
Offline
User avatar

Joined: Sun Nov 09, 2008 9:18 pm
Posts: 812
Location: Pennsylvania, USA
Broke through yet another remaining performance issue on mobile devices. I had still been observing some stuttering, every few seconds, enough to interrupt gameplay, on my 1st gen Moto X. All gone! It's as smooth as I think is possible to achieve on Android at this point. I.e. I don't think I've played a single game on Android that achieves the smoothness possible on PC or iOS. Heck even John NES emulator does what I'm talking about (every few seconds, a frame is dropped). I'll update the demos and apk sometime soon.

*edit* Just noticed the CHR-RAM streaming test now runs at 60fps on Android. 7 chr tiles are uploaded each frame. I think that's the max you can do on NES itself, as when I try 8 I get glitches.

In addition, the stuck button issue on iOS is resolved.

Next things on my list:
-Make save states work on mobile devices
-Add menu to mobile devices
-Correct simulation of how PPU sorts background and foreground pixels. Right now certain effects are faked for common use cases.
-Improvement of touch controls on mobile so that they are a consistent size regardless of your screen size, as well as making them work for portrait orientation as well as landscape.
-Adding ability to skin the touch controls so you can have controls that fit the theme of your game.
-Continue to adapt more games to GGVm!


Top
 Profile  
 
PostPosted: Fri Mar 24, 2017 7:22 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 9655
Location: Rio de Janeiro - Brazil
GradualGames wrote:
7 chr tiles are uploaded each frame. I think that's the max you can do on NES itself, as when I try 8 I get glitches.

Well, that greatly depends on the type of loop you use to copy the bytes. With a fully unrolled loop and doing nothing else during vblank, you could easily update 16 tiles per frame. In my engine I believe I can do 12 tiles per frame if it's the graphics I have stored in immediate mode (LDA #$XX, STA $2007, which is only 6 cycles per byte).


Top
 Profile  
 
PostPosted: Fri Mar 24, 2017 7:36 am 
Offline
User avatar

Joined: Sun Nov 09, 2008 9:18 pm
Posts: 812
Location: Pennsylvania, USA
tokumaru wrote:
GradualGames wrote:
7 chr tiles are uploaded each frame. I think that's the max you can do on NES itself, as when I try 8 I get glitches.

Well, that greatly depends on the type of loop you use to copy the bytes. With a fully unrolled loop and doing nothing else during vblank, you could easily update 16 tiles per frame.

Cool...maybe I'll try unrolling the copy loop in the test, and then see how it fares. I'd love to be able to say it can support the max case for this ability.
Quote:
In my engine I believe I can do 12 tiles per frame if it's the graphics I have stored in immediate mode (LDA #$XX, STA $2007, which is only 6 cycles per byte).

Whoa, you mean you actually have graphics stored as code? Neat.


Top
 Profile  
 
PostPosted: Fri Mar 24, 2017 7:45 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 9655
Location: Rio de Janeiro - Brazil
GradualGames wrote:
Whoa, you mean you actually have graphics stored as code? Neat.

Heh, only for really critical stuff... This expands the graphics by a factor of 5 after all!


Top
 Profile  
 
PostPosted: Fri Mar 24, 2017 8:17 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18361
Location: NE Indiana, USA (NTSC)
Popslide uses 8 cycles per byte plus I think 50 cycles per transfer of up to 64 bytes. This means you can fit an OAM DMA (526 cycles) and up to three 64-byte transfers (562 cycles each) totaling 12 tiles into an NTSC vblank (~2270 cycles). Then you can use the draw portion of the pre-render line (85 cycles) to set scroll position.


Top
 Profile  
 
PostPosted: Sat May 27, 2017 8:03 am 
Offline
User avatar

Joined: Sun Nov 09, 2008 9:18 pm
Posts: 812
Location: Pennsylvania, USA
A bunch of bugs have been found and fixed. Additionally, the first split screen capability has been added (it uses Sprite 0 to determine where to do the split, but actual Sprite 0 status spinning continues to be unsupported, and never will be) via a special register on the cpu bus. Finally, GGVm is now more straightforward to use for audio. You don't need to code a complex sound adapter anymore, you can just write to a few simple registers on the cpu bus to play a song #, a sfx #, or pause/resume/stop the music. These new features are all documented on the github README.md under the section "Virtual Registers"


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 45 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 7 hours


Who is online

Users browsing this forum: kazblox 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