Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Jo
Jan 24, 2005

:allears:
Soiled Meat

Sedro posted:

Can it render cat pictures?




Nippashish posted:

This is awesome please put it on the internet when you're done with it I will totally use this thing all the time.

Sure! I'm going to try and get it into the Ubuntu repo when it's ready enough. Until then, it's on github and builds under Rust 1.9. Link: https://github.com/JosephCatrambone/catpicture

If you want a pure download for Linux, you can get that here: http://josephcatrambone.com/projects/catpicture/catpicture_linux

Note that this is the unstable indev version. Use -? for params. Don't forge to pass -w and -h if you have a big picture.

MNIST sample. Note using curl -sv with a pipe.



EDIT: Updated with working support for -g to force greyscale and automatic aspect ratio detection.



EDIT: Added different rendering modes.

Jo fucked around with this message at 02:44 on Jun 12, 2016

Adbot
ADBOT LOVES YOU

Centripetal Horse
Nov 22, 2009

Fuck money, get GBS

This could have bought you a half a tank of gas, lmfao -
Love, gromdul

Jo posted:

Sure! I'm going to try and get it into the Ubuntu repo when it's ready enough. Until then, it's on github and builds under Rust 1.9. Link: https://github.com/JosephCatrambone/catpicture

If you want a pure download for Linux, you can get that here: http://josephcatrambone.com/projects/catpicture/catpicture_linux


EDIT: Added different rendering modes.

Yeah. This is pretty great.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

DOS is fun! Sound programming is... not. :v:

https://www.youtube.com/watch?v=362rNaXCcjQ

One channel of 22KHz 8-bit mono WAV playback so far. It works through single-shot DMA transfer so that's where the annoying pops come from - once I figure out how the auto-initialized mode works I can just construct my own audio buffers as needed and throw them at the sound card.

Luigi Thirty fucked around with this message at 04:22 on Jun 14, 2016

hendersa
Sep 17, 2006

Luigi Thirty posted:

DOS is fun! Sound programming is... not. :v:

https://www.youtube.com/watch?v=362rNaXCcjQ

One channel of 22KHz 8-bit mono WAV playback so far. It works through single-shot DMA transfer so that's where the annoying pops come from - once I figure out how the auto-initialized mode works I can just construct my own audio buffers as needed and throw them at the sound card.

Now all you need is the shareware nag/catalog screen!

Centripetal Horse
Nov 22, 2009

Fuck money, get GBS

This could have bought you a half a tank of gas, lmfao -
Love, gromdul

hendersa posted:

Now all you need is the shareware nag/catalog screen!



I recently found an archive of Apogee catalogs, and I downloaded a bunch of them. I remember paging through those as a kid, and being filled with wonder, and excitement, and desire while reading about their latest creations. "Over two megabytes of high resolution graphics!"

I also recently played through the entire Cosmo's Cosmic Adventure series. For my money, that was one of the best platformer series of all time.

Regalia
Jun 11, 2007

Luigi Thirty posted:

DOS is fun! Sound programming is... not. :v:

https://www.youtube.com/watch?v=362rNaXCcjQ

One channel of 22KHz 8-bit mono WAV playback so far. It works through single-shot DMA transfer so that's where the annoying pops come from - once I figure out how the auto-initialized mode works I can just construct my own audio buffers as needed and throw them at the sound card.

If you like DOS, you might be interested in this video about porting Retro City Rampage to DOS.

https://www.youtube.com/watch?v=kSKeWH4TY9Y

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Regalia posted:

If you like DOS, you might be interested in this video about porting Retro City Rampage to DOS.

https://www.youtube.com/watch?v=kSKeWH4TY9Y

Thanks for that link. Love those.

MrMoo
Sep 14, 2000

Targeting 486-DX but only 1.44MB is a bit odd, 1.72MB formats were common then, up to 2MB for I think the MS installers.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

MrMoo posted:

Targeting 486-DX but only 1.44MB is a bit odd, 1.72MB formats were common then, up to 2MB for I think the MS installers.
Brian kinda has a thing for hard challenges. It wouldn't surprise me at all if he went for the lower-tier option because "well I want a 486 version that would have run on everything back then, not just high-end, you know, a really good release."

... also, wow, that is bringing back some serious memories. Can't really say I miss those days, but glad I didn't miss them entirely.

Shalinor fucked around with this message at 02:11 on Jun 16, 2016

Centripetal Horse
Nov 22, 2009

Fuck money, get GBS

This could have bought you a half a tank of gas, lmfao -
Love, gromdul

MrMoo posted:

Targeting 486-DX but only 1.44MB is a bit odd, 1.72MB formats were common then, up to 2MB for I think the MS installers.

1.7MB floppies were never common, at least on on IBM-PCs; they weren't even a real format. Microsoft shipped stuff on 1.7MB floppy disks, but that was more akin to overburning than a new format, and they were unreliable and quickly superseded by CD-ROM drives. Amigas, and possibly others, could get 1.7+MB out of standard 3.5" disks, but (I think) that was because the formatting meta data took up less space on those architectures. The 486DX/33, which he specifically mentions in the video, appeared probably right at the turn of the 1990s, and the 1.44 megabyte floppy showed up sometime in the late '80s. It would have been a bit odd if he had targeted any format other than a 1.44 megabyte floppy.

CD-ROMs were also becoming common at around that time, but there wouldn't be much point in targeting 640MB as part of a retro effort.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

It wouldn't really matter except for how many disks the install required. Plenty of games were more than 1 floppy. I think it is more for the challenge.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

And here I am failing to get IRQ5 hooked up to a protected-mode interrupt handler. :mad:

ndb
Aug 25, 2005

I'm still working on creating my own language, but I'm also working on yet another lovely game, which is a hybrid of an choose your own adventure game and an action RPG. It's written in Javascript (not using Canvas, either), and will have a backend in Java so that you can continue your journey from device to device. It's basically about my experiences being institutionalized, with an aspect of being an adventurer while you are sleeping to defeat demons.

The UI is a complete mess and total work in progress (especially since I've only been working on this for the last hour :j:), and basically I just have the title screen and the screen where you choose & create a player.

ndb fucked around with this message at 04:30 on Jun 16, 2016

ErIog
Jul 11, 2001

:nsacloud:


I've got rudimentary text rendering working with FreeType. I need to make it a loooot more robust than it is now, though. The kerning is all sorts of off because I'm kludging the position of the glyph quad real hard.

Eventually I'm probably going to drop FreeType and move to a baked format like AngelCode BMFont with neato signed distance fields. FreeType with glyph caching was easier to get working at the moment because I didn't have to write a parser and I could get full Unicode working more quickly.

Centripetal Horse
Nov 22, 2009

Fuck money, get GBS

This could have bought you a half a tank of gas, lmfao -
Love, gromdul

taqueso posted:

It wouldn't really matter except for how many disks the install required. Plenty of games were more than 1 floppy. I think it is more for the challenge.

Sure, which is why I mentioned he could have used a CD-ROM and still been period-accurate, but that obviously wasn't the point of the project. I was just pointing out that there was nothing whatsoever odd about selecting 1.44MB discs as the medium.

Anyway, that video was very cool, and I would love to hear more technical details about the challenges he faced and overcame during that project. He mentions in that video that he has other videos. I am going to try and find some of those.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Centripetal Horse posted:

Anyway, that video was very cool, and I would love to hear more technical details about the challenges he faced and overcame during that project. He mentions in that video that he has other videos. I am going to try and find some of those.

The actual "making of" video is good if you haven't seen it already

https://www.youtube.com/watch?v=Hvx4xXhZMrU

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

Centripetal Horse posted:

just pointing out that there was nothing whatsoever odd about selecting 1.44MB discs as the medium.

Yeah, I 100% agree with that.

Centripetal Horse
Nov 22, 2009

Fuck money, get GBS

This could have bought you a half a tank of gas, lmfao -
Love, gromdul

Bob Morales posted:

The actual "making of" video is good if you haven't seen it already

https://www.youtube.com/watch?v=Hvx4xXhZMrU

I think he mentioned this in the other video, but I have not watched it, yet. I am putting it on in the background, right now, so I can listen at work.

Neurion
Jun 3, 2013

The musical fruit
The more you eat
The more you hoot

Luigi Thirty posted:

And here I am failing to get IRQ5 hooked up to a protected-mode interrupt handler. :mad:

How're you trying to do this? I've successfully hooked to IRQ1 in protected-mode to make a keyboard handler, so I might be able to help there.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Neurion posted:

How're you trying to do this? I've successfully hooked to IRQ1 in protected-mode to make a keyboard handler, so I might be able to help there.

I figured out the problem. Turns out hooking IRQ5 doesn't help when Dosbox's Sound Blaster is on IRQ7...

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Luigi Thirty posted:

I figured out the problem. Turns out hooking IRQ5 doesn't help when Dosbox's Sound Blaster is on IRQ7...
Nice! Now on to...
https://www.youtube.com/watch?v=q_A1GNx0M9M

Luigi Thirty
Apr 30, 2006

Emergency confection port.


I can do that! The Sound Blaster lets you transfer 64KB of 8 or 16-bit uncompressed digital sound at up to 44.1KHz via DMA without needing to hook any IRQs. To play back longer samples, you need to rig it up to fire an interrupt every 32KB so you can refill the buffer as needed. I haven't quite gotten there yet but I can play single samples out of an array of pointers to WAV files.

Neurion
Jun 3, 2013

The musical fruit
The more you eat
The more you hoot

Luigi Thirty posted:

I can do that! The Sound Blaster lets you transfer 64KB of 8 or 16-bit uncompressed digital sound at up to 44.1KHz via DMA without needing to hook any IRQs. To play back longer samples, you need to rig it up to fire an interrupt every 32KB so you can refill the buffer as needed. I haven't quite gotten there yet but I can play single samples out of an array of pointers to WAV files.

I haven't looked too closely at the DMA / sound buffers thing yet, but does the buffer have to be that large, or can it be something a bit more reasonable like 1/30th of a second's worth of samples?

I'm sure it's gonna be real fun to figure out a speedy way to mix multiple concurrent playing sounds as you build your sound buffer, and do it in a way that doesn't make it sound like poo poo. I've toyed with the idea myself and came up with some crazy fixed-point decimal representation and bit-shifting nonsense in order to handle it, but I've yet to actually try implementing it.

Neurion fucked around with this message at 03:14 on Jun 17, 2016

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Neurion posted:

I haven't looked too closely at the DMA / sound buffers thing yet, but does the buffer have to be that large, or can it be something a bit more reasonable like 1/30th of a second's worth of samples?

I'm sure it's gonna be real fun to figure out a speedy way to mix multiple concurrent playing sounds as you build your sound buffer, and do it in a way that doesn't make it sound like poo poo. I've toyed with the idea myself and came up with some crazy fixed-point decimal representation and bit-shifting nonsense in order to handle it, but I've yet to actually try implementing it.

Yeah, you can give the DMA chip and the DSP different buffer sizes anywhere between 1 byte and 64KB. The ISR just needs to acknowledge the interrupt and then you can do whatever you want.

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
I was just wondering, is the sound programming one of the things you're just interested in tinkering with and did you also take a look at libraries like this? I used to use this when it was still called Midas Sound System, afterwards replaced it with something called Indoor Sound System (by the guy that did Cubic Player) but for some reason I can't find that lib anywhere.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

I want to make my own 1990s-quality shareware game as a challenge. I'd rather not just use external libraries wholesale if possible but I've got Duke 3D's sound library to look at plus that one. Midas has a weird noncommercial license, Duke 3D's audio libs are GPLed.

One Eye Open
Sep 19, 2006
Am I awake?

Luigi Thirty posted:

I want to make my own 1990s-quality shareware game as a challenge. I'd rather not just use external libraries wholesale if possible but I've got Duke 3D's sound library to look at plus that one. Midas has a weird noncommercial license, Duke 3D's audio libs are GPLed.

Well, I don't know if it's suitable, but the Miles Sound System for DOS was put into the public domain a while back:- It's here, near the bottom(AIL version 2).

Neurion
Jun 3, 2013

The musical fruit
The more you eat
The more you hoot

One Eye Open posted:

Well, I don't know if it's suitable, but the Miles Sound System for DOS was put into the public domain a while back:- It's here, near the bottom(AIL version 2).

I had a peek at that once, and while a bunch of it is written in assembly, I was able to glean a few good ideas from it.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

One Eye Open posted:

Well, I don't know if it's suitable, but the Miles Sound System for DOS was put into the public domain a while back:- It's here, near the bottom(AIL version 2).

Thanks, that should help even if it's in assembly. I dug up the Sound Blaster programming manual so I'm not just going by text files from 20 years ago too.

ndb
Aug 25, 2005

I've been working on learning libgdx and making an offline version of the web rpg I showed in this thread a while ago.

Pollyanna
Mar 5, 2005

Milk's on them.


Kinda looks like a higher definition version of Nanashi no Game.

Neurion
Jun 3, 2013

The musical fruit
The more you eat
The more you hoot

Update on working with the SoundBlaster 16 -- Things are going really great, except for the fact that almost NONE of the documentation I read made mention of the fact that the PIC will ignore IRQs if their mask bit is set. I spent hours last night trying to figure out why my IRQ handler wasn't being called, only to discover later that the SB16 IRQ starts off as masked when you boot up DOSBox. 2 I/O port writes later and I'm back in business. Still frustrating as hell, though.

Oh, and I also made a teensy single-character mistake in my DPMI code that resulted in a severe buffer overrun if you tried to allocate an amount memory that wasn't a multiple of 16. That bug also took too long to discover and fix. Remember to test your code against all possible use cases, kids!

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Neurion posted:

Update on working with the SoundBlaster 16 -- Things are going really great, except for the fact that almost NONE of the documentation I read made mention of the fact that the PIC will ignore IRQs if their mask bit is set. I spent hours last night trying to figure out why my IRQ handler wasn't being called, only to discover later that the SB16 IRQ starts off as masked when you boot up DOSBox. 2 I/O port writes later and I'm back in business. Still frustrating as hell, though.

Oh, and I also made a teensy single-character mistake in my DPMI code that resulted in a severe buffer overrun if you tried to allocate an amount memory that wasn't a multiple of 16. That bug also took too long to discover and fix. Remember to test your code against all possible use cases, kids!

I added MIDI playback to my DOS game. Then I decided to start bolting a 3D renderer onto it!

A week or so of teaching myself 3D geometry and:

Neurion
Jun 3, 2013

The musical fruit
The more you eat
The more you hoot

Luigi Thirty posted:

I added MIDI playback to my DOS game. Then I decided to start bolting a 3D renderer onto it!

A week or so of teaching myself 3D geometry and:



Are you using standard VGA video modes, Mode X, or SuperVGA modes? The latter can be advantageous because if your program is running in Protected Mode you can use DPMI to map the framebuffer to your program's address space and alter the screen's contents by direct access through a pointer. You can even set the value of 4 bytes at once by writing a dword, it's quite nice. You can also do page flipping and other nifty poo poo, but I haven't gotten around to trying that myself yet.

TastyShrimpPlatter
Dec 18, 2006

It's me, I'm the
I added sounds and more animations to my game. It's still pretty rough, but it's getting there.


https://vimeo.com/174081055

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
That looks really cool!

I half expected to see the old tile pushed down below the new tile, like the board is little stacks of tiles growing downwards as you play. Probably makes the screen too noisy if you actually did that though.

Workaday Wizard
Oct 23, 2009

by Pragmatica
Love that squash and stretch :)

kayakyakr
Feb 16, 2004

Kayak is true
That looks pretty great. The animation's fantastic.

TheresaJayne
Jul 1, 2011
its a road version of mini metro

Adbot
ADBOT LOVES YOU

Cryolite
Oct 2, 2006
sodium aluminum fluoride
That's really cool. What are you writing that in?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply