Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - ninogenio

Pages: [1] 2 3 4 5 6
Freebasic / Mega_M8te chip8 all version emulator
« on: January 11, 2015 »

hey guys.

lately i have been wanting too do an emulator. i have never done one and was always curious, so i got from thursday till today off work and decided too give emulation a blast. done a bit of reading and found the good old chip 8 interpreter was rather easy to do.

so i got stuck in and done full chip 8 which appears too work 100% correctly! i thought great! but wanted to do more so i then added superchip8 opcodes and hireschip8 got all this working with full screen scrolling, 16x16 sprites etc.

then i noticed the MEGA chip 8 documentation and demos so i added that also.

this has been fun and i still have too add a few little functions for full Mega support. however my emulator runs every demo made for the mega so far.

the keys have been mapped too our pc keyboard keys{1,2,3,4,a,s,d,f,z,x,c,v}. i have included in the archive every known chip8 mega8 super8 hires8 demo game and app! as well as an assembler that does all the systems and a few tools too convert resources into asm.

now if you wish too run games i haven't prebuilt into win32 exe's just go too the huge comment block with games in my source and change the path of one of those too the rom you wish too run then build with fb.

also i need too figure out how too get my virtual cpu too dynamically throttle its self too maintain smooth 60hz screen updates right now there is a cpu var at the top of the source that i am having too change too slow down and speed up the amount of allowable cpu cycles per second as without this some of the games run uptoo 3000fps!

there is some really good games and demos prebuilt here... me and the kids really enjoy ant, the cave, blinky, car, mega8 twister demo etc.

enjoy guys and ill update probably next sunday with any changes i make. im also planning too write my first little asm mega8 game for this. then ill be onto z80 gameboy probably.

<edit - noticed when the download link is clicked a 404 pops up from dbf?>
<edit2 - its ok ive just used my dropbox. the emulator with all games source asembler etc can be downloaded from link below cheers >

Other languages / messing with the android sdk
« on: February 07, 2014 »
hey guys,

i don't know if anyone here has played about with eclipse/android sdk but for the past 2/3 weeks i have been toying with it. at first i hated the eclipse interface the whole layout is a bit of a mess and the emulators are well.... a bit pants for me.

but as soon as i got the layout sorted too something i like and figured out live debugging with my phone/tablet things just started too come together.

then i decided too port mine and combatkings little webgl javascript raycaster over and add a little menu with multiple levels etc. i ran into a huge amount of problems with all the different screen sizes that come with android devices and then i had too deal with the fact tablets have status bars at the bottom of the screen and my fov changing from device too device, it was a bit arghh :)

eventually i settled for clamping the device's screen into 16:9 and give our raycaster just over half of what ever the screen res the app is run on and give the rest too the hud. this just left the fov scaling which i eventually settled on the same calcs that were used in borderlands 2.

i have been able too test on 3 different phones and a 10.1 tab2. so far everything seems too work and scale really nicely. but i can't be sure it will work on most devices so if anyone wants too try this out let me know how it works and on which device it was tested.

all java source/resource and xml files are in here.

too just install, the jimmymcpac.apk file is is the bin folder.

cheers guys!

Other languages / just starting out in java/html
« on: January 10, 2014 »
hi every one,

i started this topic because i would like too learn as much as possible about coding in html/java i started modifying some of combatkings code last night but it all went horribly wrong. i think a good first step would be too ask what sort of environment do you guys set up too develop app/demos.

last night i was just using notepad then saving the html file dragging it into firefox and trying too debug/trace variables with the firefox debugger. it was all really rather cumbersome and taking far too much time.

so i guess a good first step would be too get comfortable with the available tools and see what you guys have learned over the years.. all the do's and dont's  :cheers:

Freebasic / messing with newtons laws of physics
« on: January 04, 2014 »
hi folks,

after watching some myth busters tonight i got a bit of a physics itch. my knowledge uptoo this point was always non existent and i just fudged stuff too look ok. but i have always wanted too figure out how too simulate the real world in code.

i stumbled on this fantastic tutorial

which led me too this little test

its just a simple test atm, no friction mass or resistance is factored in just yet.. im just droping a ball from a height of 500 metres using earths little gravity of 9.82m/s/s i calculated that the ball would accelerate up too 99.09 metres per second just at the point it hits the earth which is 99.09mps *3.6 = 356.7kph.

my code converts a 640x480 resolution too 1250x1000 meter area and the physics update at 60fps. also the acceleration gravity squares each second.

but im having a few troubles. my forcasted results arent quite lining up with my simulated ones :( im not entirely sure as too why they are very very close just not exactly spot on. so my question would be. is a few kph out after a 500 meter fall ok? or can you guys see anything iffy in what i have done here?

lots of different heights can be simulated up too 1000 meters by simply changing the InitialBallY variable. cheers folks!

i have lots planned for this like trying too include mass air resistance etc but thought i better check out this little issue first.

Freebasic / Old school mania
« on: December 29, 2013 »
hey guys, ive had the whole day free today so ive coded like a mad man  ;D

i had loads of individual freebasic stuff coded earlier in the year, with lots of stuff still too try out so thought what the heck.... Mega demo time!!!

i actually thought it would be a nice way too round out the year putting all the stuff i have done through the year in one place, and make a new year tro out of it. soooo here it is guys there is no source atm as its a complete and utter mess it would not be useful too anyone.. over the next few days ill clean and comment everything and post the code up.

some of this stuff i have already posted in bite sizes and some of it not. i have also gotten urges too try some of this stuff from various posts on this board at different times.
ohh and everything is pure framebuffer pixel pushed no gpu's were harmed during this development  :)

hey guys here is my little entry for the christmas challenge.

it was really a toss up between doing a little electronics project or using my glsl engine ive been coding all year. i could have taken the easy route and done a gfx demo but after doing hundreds of hours on the engine i needed a little break.

so here is what i came up with.

it was built around the same idea as the little demo i posted earlier in the summer but expanded too push the arduino too its limits. the whole electronics side is made up from 9 led driver chips daisy chained in groups of 3 with each driver chip connected too its own led matrix of which there are nine.

all chips share the same common vcc and ground power rail using a voltage regulator.

each group of max led drivers is connected too digital pins on the micro controller.

there are three wires too each driver chip a clock wire a dataio wire and finally load. and basically you poll these three lines sending data and quickly pulling the arduino pins low then high which in turn lights the required leds.

on the software side i had no idea if driving this from one small micro controller would be possible but i was pleasantly surprised. i started with a complete blank canvas just a few max register defines really.

first i build low level drivers which maps a 25,4 byte back buffer too the whole display treating it as one. my map function sends the back buffer as blocks too the correct max led driver chip. so from the front end you treat it like tinyptc with renderpoint(x,y) but the back end had too be coded very cleverly.this all had too be done as lightweight as possible too make effects possible.

i will when i get more time do a full postmortem and share a little further how the hardware goes together and exactly what components were used and how much.

the whole program takes up 18kilobytes of memory on the micro controller and the code is separated with large items being put in PROGMEM area of ram and the rest going into the normal area.

attached is source have fun guys.

C / C++ /C# / .x 3d animation loader
« on: August 07, 2013 »
hey guys,

i finally managed too get a .x loader ogl compatible and integrated in my engine.. what ive done is import one of my static .obj models( combo from jet set radio future). into blender then i added a full skeletal system too him, after this i had too manually weight paint each bone so when moving an armature the model mesh moves with it.

then its as simple as moving him into different positions too get animation sequences and exporting the whole lot too .x....

my loader loads both animated and static .x models it will also load animation sequences so one animation set might be run another walk etc and you can pick and choose which set you would like at a specific moment..

here is a little example too show proof of concept you will see 2 combo characters(guy with a beatbox on his shoulder) 1 is .obj static and the other is .x animated.
as soon as i clean all the code up and make it a bit less case sensitive ill post the basic loader code on its own for others too use.


use arrow keys and mouse too move/walk... and excuse the rough animations ive never done a single bone related thing till a week ago so im still getting a feel for nice smooth animations...

C / C++ /C# / mesh loaders into vbo formats...
« on: July 29, 2013 »
this is a little post too share what i have learned up too this point.

all my troubles came in when trying too format an obj file into a glsl vbo format reason being typical wavefront obj files have three index buffers..

1 for vertex buffer indexing
2 for uv coord buffer indexing
3 for normal buffer indexing

big problem being that glsl only accepts a single element_array buffer.. i then started too scratch my head and thought fml this is never going too work  :)

however.. i found.

and this..

using the lib and reading the code from the other link. i was able too rejig my vertex normal uv and index buffer in such a way that my single index buffer indexes all other buffers correctly.

the nvstrip lib also lets me interleave all my buffers into a single buffer or optimize my meshes for quite a speed boost. ill post a little example of the lib in action very soon.. ive also managed too parse the mtl and dynamically load associated textures.. then load multiple meshes from single obj file into different vbo's and skin them with the correct textures from the mtl file..

C / C++ /C# / vertex ranges.
« on: July 24, 2013 »
hey guys this maybe seems a little bit of a strange question.

ive been messing about quite a lot with model loading and one thing ive noticed is that everyone except me uses huge vertex values ranging in the 100's before any transforms or scaling just raw data, where as internally i use values in the 1.0 -1.0 (which makes my scenes roughly 20x2x20 in size) so these models when loaded are absolutely huge.

ive had too simply scale all these models based on the absolute value out of the xyz's of all the vertex's too pull everything down inside 1.0 too make them usable.

i got too thinking though maybe my shadow map glitches are coming from the fact my scenes are soooooo small when my maps are being calculated. so started having a deeper look at some of the code these big models came from and cant see any scaling down, done they dont scale inside the shaders or c code or anywhere i can see.

i dont really understand how there scenes look relatively the same scale as mine when rendered without scaling. if i were too load in these complete scenes as is it would feel a bit like the camera was attached too an ant  :)

am i missing a trick here or do you guys work with quite small values too?

-edit i should probably add that my transforms are pretty basic just like so...
Code: [Select]
       // init
        perspectivematrix(45.0f, (float)screen.right / (float)screen.bottom, 0.1f, 1000.0f);
        // setup camera identity
        // setup model identity
       // main
        // do look at stuff for camera
        // set model matrix
       // send them through too vertex shader and do a streight forward transform

C / C++ /C# / volumetric fog
« on: July 22, 2013 »
heres a little thing ive been bashing away on for the past week,

volume fogging with bsp collisions so the camera cant go through walls or any of that jazz  :). and i changed my omni shadows too moments based using a 2 channel color buffer instead of depth. it still works rough with a few bugs though..

im just posting too make sure it works ok on other systems so please drop a comment too let me know.

it might be a bit slow its completely unoptimized atm cheers guys.

C / C++ /C# / glsl shadowmapping
« on: July 04, 2013 »
hey guys,
ive spent the past week studying and working on omni direction cube shadow mapping.. im very close too a working example but for some reason i cannot get my shadow too project correctly over the scene.

i've checked and debugged.. and i am correctly grabbing 6 depth textures from the position of the light source in up down forward back left and right on a basic shader then pass everything correctly too the shadow shader. im 99% sure its something silly ive done in my shaders. probably while converting light_positions too camera space or something..

i've tried loads of things but alas nothing works.

i can provide full source if needed.

if anyone can help it would be massively appreciated id love too get this working.

C / C++ /C# / light oclusion
« on: June 30, 2013 »
hey guys,

im not quite sure the proper term for this so ill describe the problem ive ran into..

ive set an indoor scene up using a series of quad tiles for the floor roof and 4 walls then i put a supporting piller right in the middle of the room.

now i have a light source in one corner that produces specular and diffuse on all the textures in the scene..

which all look really nice. now if i move the camera behind the support piller so the piller obscures the light and look up or down the specular shines through the piller. not really caring if its hit an object or not which is obvious really as i havent provided any info ie if object is hit then stop..

thats the part im having a hard time with.. would creating shadow maps and using these too test for light fragments work. or is there a comonly used technique ive yet too find. i can provide an example if needed. cheers

C / C++ /C# / runtime problems
« on: June 27, 2013 »
hey again guys,

i've developed some weird issues. i went too add a camera system too my project which all went smooth its a look at camera. it works as expected using glm.. but only inside the vs 10 ide using visual studios play button. the minute i shut the ide down and double click my produced exe the camera is all screwed up it rotates in strange directions and starts in a different position from specified. its strange the only thing i've found is that when statically linking my glew lib into the exe in debug mode i got a few linker errors along the lines of.

1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>C:\Users\ninogenio\Desktop\apophis\Debug\apophis.exe : fatal error LNK1169: one or more multiply defined symbols found

which i belive comes from the fact that glew has been built with different run time libs.

just wondering if any of you guys have ever had similar issues. and why an exe thats run from inside the ide would behave differently too exiting the ide and running manually..

C / C++ /C# / a little stuck with glsl
« on: June 24, 2013 »
hey guys here is a very early sort of opengl engine ive been tinkering with and building for the past few weeks.

it was actually an old state engine i made for a game years ago. but i stripped it all back and started building it up geared towards demo states and glsl.. anywho it was all going nicely until i filled state 2 with a tangent example i found on the net,

for some reason no matter what i try i cannot get the cube too render im sure my vbo's are not getting through but cant see why not?! i know my shader loading and texture mapping is fine because the first state is a specular example and that works fine.. so a bit stumped atm.

you will see when you run it. it starts in state 1, then moves on too state 2 with a white background well there should be a great big bump mapped cube there.. lol. states 4 and 5 are pretty much unworked on atm.

if anyone could cast an eye on this and give me some pointers i would be mighty greatfull!!

when it gets too the 4th state just hit enter too make it loop again.. and the whole demo state thats causing me trouble is in ApophisState2.cpp.

C / C++ /C# / halodunkers gdi
« on: June 13, 2013 »
hey guys the other thread about gdi got me remembering i had done some experiments of my own in the past and this was the main one..

however the code was missing but luckily i found the source tucked far away in my back up disks, it was all done in dev c, and it was serious mess errors and warnings everywhere so just rebuilt it all in vs10. then i got the urge too polish it up and make it look nicer.. so a couple of hour polishing and here we are.

it pretty much does everything that gdi has too offer including using the speech api.
hopefully someone finds this of use..

ps. sad as it is. me and my mates were giggled up all last night getting the laptop too say all kinds of stuff  ;D

C / C++ /C# / setting up a good glsl enviroment
« on: June 09, 2013 »
hey guys spent the last week getting comfy with visual studio/opengl again..

im currently building a few basic glsl things using glew and glut.
which works fine but it feels a little abstract and far away too me.

im just curious as too what, if any libs you guys like too use.


Freebasic / normalmaping displacement
« on: June 02, 2013 »
hey guys me again,

i thought id have a little break today from some of the more difficult stuff im doing. so started speeding up my bumpmapping. realised i was doing loads of unecessary shifts and was able too precalce some bits(Reflection vector..Cheers hellfire), managed too get it up too about 100fps on a single core!..

while doing this i thought what if i was too have a mess around with the normals in the normal map. so after trying loads of diffrent things i got too here.. i think it looks quite cool. ive optimized the snot out of it but think it could still give lots more.

too allocate more cores press the x key less cores the z key and too make it rain the r key puddle the p key and change images the 1 and 2 keys.

ive included non threading code for easy too readness.

so quick run down of the keys....
p = puddle
r = rain
1 = image 1
2 = image 2
z = less cpu cores
x = more cpu cores
it might run really slow but hopefully you guys get the idea..

ive tried too make it as bit wise as i could so next up i can mess around with assembler..

[ -edit oops realised ive left one of my ascii projects in the easy too read folder ohh well ill leave it there as an extra  :P ]

have fun guys..
peace out!!  :)

Freebasic / some matrix tests
« on: May 22, 2013 »
hey again guys.

in order too get my other project working im going too need matrix's everywhere i need too get viewdir matrix, camera, model, projection etc.

so i figuared id get stuck back in. i dug out this peice of code i made ages ago and got a feel for it again. trasfered it all into my software engine and it seems too be working good. it gives me a camera and model matrix,

my question is how would i go about building a projection matrix similar to opengls one, for use in a software engine too go along side these?.
and how do you get the view( or eye space matrix ) is this simply the camera matrix inversed? 

in the little example use arrow keys and wsda keys.

General chat / Fun with l.e.d.s
« on: May 20, 2013 »
hey guys here is a little something different from me... i got some electronic stuff in the mail today, finally! so put a little project together. it uses the max7221 led driver chip and the atmega328 micro controller. they drive a little 8x8 led matrix.

really just a simple little project to get this off the ground. next up is led rgb where i feed each color channel with its own max7221.

i have also built a little temperature thermostat not visable in the video so when my rgb led matrix comes i can do plasma effects based on heat( seen an example on youtube and thought it looked cool :) )

Word of warning turn down your speaker volume before playing. i was playing some music unlimited on my vita and the camera picked the music up 10000 times louder than it was lol...

for any one interested i got the code from here and just modified the speed and text too check that it was all working as hoped;wap2

Freebasic / little 3d cube with bumpmapping.
« on: May 18, 2013 »
hello guys.

ive mapped the bumpmapping stuff from the other thread onto a prespective correct cube. too see how it would look. ive kind of gotten myself a little stuck though.

the problem mainly comes from the fact that i keep my texture process seperate from the rasterizer so once it comes time too map it onto the cube if the texture gets shrunk of spun or stretched in diffrent direction from which it was processed the lighting gets inverted and skewed. i was trying some angular stuff too try and give myself a point of refrence too work off durring the texture lighting as can be seen with the blue circle but no joy.

if anyone has any ideas id love too hear cheers!

<edit for epiphany>actually thinking about it diffuse and specular terms should be an integral part of the rasterizer. its really the only way to do them correctly while moving and scaling the texture dynamically  :P. and all the info is already too hand i guess. x,y,z pos down too the pixel. some more thinking too do i guess!

Pages: [1] 2 3 4 5 6