Search found 130 matches
- Nov 12, 2017 9:27
- Forum: General
- Topic: passing strings to external functions
- Replies: 23
- Views: 2497
passing strings to external functions
what is the difference between these three code snippets? I have found that only one of them works, but I don't know why. declare function SomeThing (byval as any ptr) as integer dim stuff as string stuff="cheerios" ? SomeThing(@stuff) declare function SomeThing (byref as string) as intege...
- Oct 26, 2017 4:56
- Forum: Game Dev
- Topic: Ways in which I can embed a video player into GFX window?
- Replies: 18
- Views: 8829
Re: Ways in which I can embed a video player into GFX window?
Vorbis shouldn't have any patents. I think that was pretty much the whole point of it. It can also be used with AVI (Vorbis ACM codec). I'm not sure why you think AVI would take more space, it depends 98% on which codecs are used, not so much on the container.
- Oct 23, 2017 8:32
- Forum: Sources, Examples, Tips and Tricks
- Topic: convert WAV files with ACM (win32)
- Replies: 0
- Views: 1045
convert WAV files with ACM (win32)
Here is a program that converts a WAV file containing uncompressed PCM to one containing MP3 audio. This requires the LAME MP3 ACM codec being installed on your system. Specify the input file and output file names on the command line. ' convert PCM to LAME 160Kbps, CBR, 44KHz stereo ' compiled with ...
- Oct 23, 2017 7:49
- Forum: Game Dev
- Topic: Ways in which I can embed a video player into GFX window?
- Replies: 18
- Views: 8829
Re: Ways in which I can embed a video player into GFX window?
Bink might be an option. It's really easy to use but you would have to use the .bik format for your cutscenes. Edit: Come to think of it. I believe you have to purchase a license if you want to distribute your game. So this may not be an option for you. Now that you mention it, wouldn't there be si...
- Sep 30, 2017 9:17
- Forum: General
- Topic: Find the best 8 bit palette for an RGB image
- Replies: 67
- Views: 8710
Re: Find the best 8 bit palette for an RGB image
@D.J.Peters To use floyd-steinberg dithering you need a modifiable copy of the bitmap (or at least two raster lines at a time I guess). Could your function to convert to CGA colors pass a pointer to a bitmap instead of a single pixel? My program can already convert to CGA/EGA palette... http://www.h...
- Sep 29, 2017 9:58
- Forum: General
- Topic: Find the best 8 bit palette for an RGB image
- Replies: 67
- Views: 8710
Re: Find the best 8 bit palette for an RGB image
actually I just noticed that irfanview also has a checkbox for Floyd-Steinberg which works well on my test image...
- Sep 29, 2017 7:37
- Forum: General
- Topic: Find the best 8 bit palette for an RGB image
- Replies: 67
- Views: 8710
Re: Find the best 8 bit palette for an RGB image
My two cents... In the program "IMGTOOL" that I have posted previously there is a color reduction routine. I will explain the algorithm used: 1) count colors and sort by frequency 2) set threshold for "close enough" color distance 3) beginning with colors of least frequency, remo...
- Sep 16, 2017 21:24
- Forum: Windows
- Topic: Streaming audio
- Replies: 12
- Views: 5243
Re: Streaming audio
Finaly I have discovered the simplest way to play a WAV music. Yes! Playing WAV data from memory buffer is also similar. The only thing needed from includes is a single declaration. Why didn't anybody tell me it was this easy? ' Windows PCM audio demo ' take care not to blow up your speaker declare...
- Jul 16, 2017 7:40
- Forum: Sources, Examples, Tips and Tricks
- Topic: randomly generated graphics demo
- Replies: 5
- Views: 1820
randomly generated graphics demo
I came up with this algorithm a while back when I was thinking about possibilities for the 4KB demo category. Of course, FB executable itself is much too big. I could have made it a Sega Saturn or DOS program... but I never did. Most of the parameters are randomly chosen but some are tunable by hand...
- Jul 08, 2017 8:04
- Forum: DOS
- Topic: Executing a child 32bit DOS program and sharing a function
- Replies: 7
- Views: 2421
Re: Executing a child 32bit DOS program and sharing a function
I've never tried this, but I guess you would use DPMI function $0205 Set PM Interrupt Vector. And it seems that you can determine the address of an FB subroutine by using the syntax @SubName (as seen in FBWiki page for ThreadCreate). Then use inline assembly to put an iret instruction at the end of ...
- Jan 30, 2017 9:03
- Forum: General
- Topic: Free library to read and write JPEG pics?
- Replies: 12
- Views: 1684
Re: Free library to read and write JPEG pics?
You may want to check out my posts in the "Tips and Tricks" section. I posted an example program which displays JPG on the screen, and one which converts BMP to JPG. The source code for my IMGTOOL also contains both routines but with assembly optimization (and possibly some bug fixes for t...
- Oct 14, 2016 6:46
- Forum: Projects
- Topic: 3d model editor (and other stuff)
- Replies: 7
- Views: 3988
Re: 3d model editor
Here is an update to MBFAST. Changes include automatic memory management instead of manual, 4bpp screen support, probably some other things. I worked on the "drill" function which is now partially functional. I'm also including IMGTOOL, a bitmap editor. Has basic stuff like crop, resize, c...
- Sep 27, 2016 6:25
- Forum: DOS
- Topic: Why are graphics so slow, especially in high resolution, in DOS?
- Replies: 10
- Views: 3790
Re: Why are graphics so slow, especially in high resolution, in DOS?
You might need to use utilities such as FASTVID or MTRRLFBE to enable write combining for faster screen updates under pure DOS.
With write combining enabled, sequential writes (eg. framebuffer copy) to video memory usually become 2-3x faster.
With write combining enabled, sequential writes (eg. framebuffer copy) to video memory usually become 2-3x faster.
- Jun 03, 2016 8:56
- Forum: General
- Topic: OOP or not OOP... That's the question! XD
- Replies: 21
- Views: 3256
Re: OOP or not OOP... That's the question! XD
I'm an assembly language programmer at heart. High level languages hide certain realities of the underlying hardware/OS and replace them with abstractions. There are some abstractions that I like. Not always having to micromanage CPU register usage is a time saver, for instance. There are other abst...
- May 22, 2016 22:38
- Forum: Community Discussion
- Topic: Frustrated and need to discuss...
- Replies: 69
- Views: 6846
Re: Frustrated and need to discuss...
Here is a dirty, unoptimized PNG decoder. http://www.hyakushiki.net/misc/pngl.bas Only supports 8bit samples. No palettes. No CRC checking. Red and blue are backwards. Does not support static huffman tables (which aren't supposed to be used in PNGs but some programs use them anyway it seems) RFC 195...