search:   
A Tub of Awesome!By Scet      
Page:   1 2 »»

Thursday, November 24, 2005
(long update, not like anyone reads this)

LittleBoy/Programming:
The 8080 core is finished, but I haven't been able to run anyhting yet since I can't get interrupts working :(

I'm also converting totally to C++. I've ripped out all the old C functions(like memcpy and ZeroMemory) and replaced them with std calls. I'm also working one a window wrapper class to cure myself of singletons.

Some pointy operator overloading goodness:

struct {
unsigned char *Pntr;
void operator=(unsigned char *Address){Pntr=Address;}
unsigned char PositionX,PositionY;
void Render(unsigned char X,unsigned char Y,PaletteEntry *Palette,unsigned char Flags){
if(bool(Flags&0x10)){Palette+=4;}
for(unsigned long i=0;i<8;i++){
for(unsigned long j=0;j<8;j++){
if(bool(Flags&0x20)){PositionX=X+(7-j);}else{PositionX=X+j;}
if(bool(Flags&0x40)){PositionY=Y+(7-i);}else{PositionY=Y+i;}
ScreenMemory[PositionY][PositionX]=GetColour(Pntr[i<<1],Pntr[(i<<1)+1],7-j);}}
return;}
} Tile[0x180];






used to be:

#define GetColour(B1,B2,Index) ((B1>>Index)&1)|(((B2>>Index)&1)<<1)

void RenderTile(unsigned char X,unsigned char Y,unsigned char *Src,PaletteEntry *Palette,unsigned char Flags){
//if(bool(Flags&0x10)){Palette+=4;}
for(unsigned long i=0;i<8;i++){
for(unsigned long j=0;j<8;j++){
Colour=Palette[GetColour(*Src,*(Src+1),7-j)];
if(bool(Flags&0x20)){PositionX=X+(7-j);}else{PositionX=X+j;}
if(bool(Flags&0x40)){PositionY=Y+(7-i);}else{PositionY=Y+i;}
ScreenMemory[PositionY][PositionX]=Colour;}
Src+=2;}
return;}






I can now just set the tile addresses when the program starts.

for(unsigned long i=0;i<0x180;i++){Tile[i]=GetPointer(0x8000|(i<<4));}

This makes things a lot easier since I can just take the tile number in the maps and just call Tile[number].Render() instead of having to find the address and get pointers.

The 1W1B2 Contest
OK I knew I'd lost after playing some of those games. Not a big deal since I could easily go out and buy that card.

Still everyday that goes by, the thing turns into more of a farce. I know I souldn't attack others games, but seriously some of them shouldn't have been submitted and deserved the marks they got.

"Thermal - Judge G: 9/10 Neat game and cool installer to go along with it."

Rav, if you happen to read this. Getting another judge just to please whiners was seriously lame. 9/10? It's a plane that just goes up and down(hmmm like my game) and some cubes.

I don't even know why we needed the panel of judges. What the fuck happend to the people running the contest? They're giving the stuff away, they should say who gets it.

IMO either "Eat" or "Pierre and the Fish" should win.

As for my game(HeliKool) many people say it's too hard/fast. The reason for that is because when I had people paly test it, they said it was too easy/slow. So I added enemies and cranked up the speed. I was actually going to speed it up more before submitting...

Oh yeah and if you're going to play my game at least read the fucking manual.

Quote:

The level will continue forever. When you run low on fuel or are too heavily damaged, the game ends since you must return to base. Be aware that if you crash into the terrain you die and you'll get a score of 0.




I know reading the readme won't make anyone like my game, but they could at least stop bitching about certain things.

The Forums:
The new theme is totally unprofessional, it looks like a fresh install of some cookie-cutter forum software. I tried it, but my eyes hurt so I've gone back to using www2. Mabye when they make that dark theme I'll give it another shot. A computer screen is not a peice of paper.

Comments: 2 - Leave a Comment

Link



Wednesday, November 2, 2005




That's right. I've started working on LittleBoy, the GameBoy/GB Colour emulator to go along with FatMan. FatMan is hardly a dead project, I just got bored working on the same thing for so long.

The screenshots above are from memory dumps, not cartridge ROMS. I'm still working on the Z80(actually Sharp80) core and I can't even start to try stuff out before it's done. As you can see the tile render function works, but the palettes are exactly right(kirbies should be lighter). The tool dialogs have FatMan have been imported and operate in almost the same way except the addresses have changed.



Comments: 4 - Leave a Comment

Link



Wednesday, October 26, 2005
I have this week off so you'd think I'd get a ton of work done, but no. For some reason the more free time I have, the less motivated I am.

Anyway I tried to add blending:



and failed :( Oh well.

I also fixed some dialog bugs. The Tile Viewer, Sprite Viewer and Map Viewer are all now fully functional.

I hate bugs. I simply will not allow something I know has bugs to be released with my name on it. So it might be a while till I squash all the bugs and get back to adding features.

Comments: 0 - Leave a Comment

Link



Monday, October 24, 2005


Well the frequancy of the problem keep increasing last night. This morning it got to the point of being constant. Had to put the old girl to rest.

RIP

I will miss abusing the degauss button.

Now I'm stuck with my spare 14" which has no degauss

Comments: 2 - Leave a Comment

Link



Sunday, October 23, 2005
You know that feeling that occurs right before something dies horribly? Yeah... My monitor is acting really weird. At totally random intervals the screen stretchs horizontally then returns to normal. It occurs for less than a second, but it hasn't happened before. It happened four times while writing this

I'm hoping it's just the monitor acting up and not some power surge or vidoe card crap, cause I have a spare monitor.

:(

Why the hell isn't there a sad post icon for GDNet+? Bastards.

Comments: 1 - Leave a Comment

Link



Friday, October 21, 2005
OK I finished the map viewer, which completes all the tools(still plenty of bugs to squash).



Yeah I haven't had much time to work on FatMan thanks to midterms

People are already starting to drop out, and I know why. Most of them can barely speak English and English courses(2 for them, 1 for the rest of us) are mandatory. They ask questions and the professors get to say "I have no idea what you're saying". At first it was funny, but now it's sad :(

(Just so no one asks, I'm not dropping out. I'm getting A's and B's :) )

Comments: 3 - Leave a Comment

Link



Tuesday, October 18, 2005
Well I didn't get any more demos running over the weekend, just some graphics related stuff.

First there's windowing. The GBA has two windows which allow only certain sections of a background to be drawn. This is for effects like sweeping, dialog boxes and two player split screens.

Before:


After:


I've also added "Grayscale" and "High Contrast" video modes. When combined they produce an "Old school GameBoy" look:





Comments: 3 - Leave a Comment

Link



Friday, October 14, 2005
More "real progress" in the past week. I've gotten about 3 demos fully working and 4 half-working(they break down after awhile). This is all due to fixing LDM and STM, and adding the VBlank and VCount interrupts although VCount is still a mess.

Another plasma demo I got to run:


I've also made a high-performance timer class to help with things like VCount and opcode cycle timing.

class HighTimer{
private:
      LARGE_INTEGER OldTime,NewTime;
public:
       unsigned long long PausedCycles,Cycles,Frequancy,Intervals,OldIntervals;
       HighTimer(){LARGE_INTEGER Freq;QueryPerformanceFrequency(&Freq);Frequancy=Freq.QuadPart;Cycles=0;Intervals=0;return;}
       void Reset(){Cycles=0;return;}
       bool Process(unsigned long long Freq,unsigned long long Max){
        if(Cycles==0){QueryPerformanceCounter(&OldTime);}
        QueryPerformanceCounter(&NewTime);
        Cycles=NewTime.QuadPart-OldTime.QuadPart;
        OldIntervals=Intervals;
        Intervals=Cycles/Freq;
        if(Intervals>=Max){Intervals=Cycles=0;return 1;}
        return 0;}
};





(I formatted it just for you, mattd)

It's pretty niffty. For example to get my emulator to run at 60FPS regardless of the monitors refresh rate:

HighTimer VBlank;
//blah blah balh
VBlank.Process(VBlank.Frequancy/60,60);
if(VBlank.Intervals!=VBlank.OldIntervals){
//render
}

Edit: looks like this one worked, damn broke-ass GDNet.

Edit 2: Appears to have just been an FF bug, of course

Comments: 0 - Leave a Comment

Link



Saturday, October 8, 2005
OK so after totally fixing the STR and LDR opcodes(hopefully for then last time) and adding in the VCOUNT memory register I was able to get two demos fully functional.

The first is the plasma demo I was talking about in the last post, but the graphics problems are gone and it works at full speed now.



The second is a little more advanced. It has two scrolling backgrounds(one is slower than the other) and a little spaceship sprite. The sprite can be moved horizontally using the GBA DPAD(arrow keys in FatMan).







Comments: 5 - Leave a Comment

Link



Sunday, October 2, 2005
This is what we call bad algorithm design:

void RenderTile4bit(unsigned long X,unsigned long Y,unsigned long &Address,unsigned long Palette[256],unsigned long PaletteIndex,unsigned long Flip){
SrcPntr8=GetPointer8(Address);
switch(Flip){
case 0: LoopStart[2]=0;LoopEnd[2]=8;LoopStep[2]=1;LoopStart[3]=0;LoopEnd[3]=8;LoopStep[3]=1; break;
case 1: LoopStart[2]=0;LoopEnd[2]=8;LoopStep[2]=1;LoopStart[3]=8;LoopEnd[3]=0;LoopStep[3]=0xFFFFFFFF;X--; break;
case 2: LoopStart[2]=8;LoopEnd[2]=0;LoopStep[2]=0xFFFFFFFF;LoopStart[3]=0;LoopEnd[3]=8;LoopStep[3]=1;Y--; break;
case 3: LoopStart[2]=8;LoopEnd[2]=0;LoopStep[2]=0xFFFFFFFF;LoopStart[3]=8;LoopEnd[3]=0;LoopStep[3]=0xFFFFFFFF;X--;Y--; break;
default: break;};
for(unsigned long y=LoopStart[2];y!=LoopEnd[2];y+=LoopStep[2]){
for(unsigned long x=LoopStart[3];x!=LoopEnd[3];x+=LoopStep[3]){
PositionX=X+x;PositionY=Y+y;
if(x%2==0){
if((*SrcPntr8&0x0F)!=0){WritePixel(PositionX,PositionY,Palette[(*SrcPntr8&0x0F)+PaletteIndex]);}}else{
if((*SrcPntr8>>4)!=0){WritePixel(PositionX,PositionY,Palette[(*SrcPntr8>>4)+PaletteIndex]);}
SrcPntr8++;}}}
return;}

void RenderTile8bit(unsigned long X,unsigned long Y,unsigned long &Address,unsigned long Palette[256],unsigned long Flip){
SrcPntr8=GetPointer8(Address);
switch(Flip){
case 0: LoopStart[2]=0;LoopEnd[2]=8;LoopStep[2]=1;LoopStart[3]=0;LoopEnd[3]=8;LoopStep[3]=1; break;
case 1: LoopStart[2]=0;LoopEnd[2]=8;LoopStep[2]=1;LoopStart[3]=8;LoopEnd[3]=0;LoopStep[3]=0xFFFFFFFF;X--; break;
case 2: LoopStart[2]=8;LoopEnd[2]=0;LoopStep[2]=0xFFFFFFFF;LoopStart[3]=0;LoopEnd[3]=8;LoopStep[3]=1;Y--; break;
case 3: LoopStart[2]=8;LoopEnd[2]=0;LoopStep[2]=0xFFFFFFFF;LoopStart[3]=8;LoopEnd[3]=0;LoopStep[3]=0xFFFFFFFF;X--;Y--; break;
default: break;};
for(unsigned long y=LoopStart[2];y!=LoopEnd[2];y+=LoopStep[2]){
for(unsigned long x=LoopStart[3];x!=LoopEnd[3];x+=LoopStep[3]){
PositionX=X+x;PositionY=Y+y;
if(*SrcPntr8!=0){WritePixel(PositionX,PositionY,Palette[*SrcPntr8]); }
SrcPntr8++;}}
return;}








this is what's called better algorithm deisgn:

#define WritePixel(x,y,p) if(p!=0 && (unsigned)x<=255 && (unsigned)y<=255){ScreenMemory[y][x]=Palette[p].Colour;}

void RenderTile(long X,long Y,unsigned char *Src,PaletteEntry *Palette,unsigned short Flip,bool Colours){
for(long i=0;i<0x40;i++){
if(bool(Flip&0x0001)){PositionX=(7-(i%8))+X;}else{PositionX=(i%8)+X;}
if(bool(Flip&0x0002)){PositionY=(7-(i/8))+Y;}else{PositionY=(i/8)+Y;}
if(!Colours){
if(i%2==0){
WritePixel(PositionX,PositionY,(*Src&0x0F));}else{
WritePixel(PositionX,PositionY,(*Src>>4));Src++;}
}else{WritePixel(PositionX,PositionY,*Src);Src++;}}
return;}








So I can now display the sprites and maps that where to the left of screen(negative) which has fixed a huge number of graphics problems.

Also after messing with LDR opcode I was ABLE TO RUN A GBA DEMO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(add a million more !'s)!

HOORAY!!!! REAL PROGRESS!


hmmm I can't find the demo online, it was a plasma demo from gbadev.org. Anyway it runs really slow but at least it works

I'll keep downloading demos and seeing if I can get them working.

Edit: Also don't froget that Epson is run by Satan and Jebus commands you to boycott them.>

Comments: 4 - Leave a Comment

Link



Thursday, September 22, 2005
OK I fixed the Memory Viewer. The problem was so retarded, I messed up the y coords in the resource file and most of the boxes overlapped.



(search and memory dump don't work yet)

Also the Sprite/OAM/Object Viewer is done:



(this dailog is fully functional)

Anyway for those following this here's a list of everything that has to get done:
- Sound
- IRQs (yuck)
- Map Viewer
- Fixor the bugs in the dialogs
- Fix some problems with sprites
- Blending
- Mosaic
- Rotation and scaling for sprites and backgrounds

- Background modes 1 & 2 (2==Mode 7 stuff too)
- A way to report bad memory writes/reads for people that try to access certain memory at the wrong time or through the wrong bus.
- Battery backed save games
- Save states
- Cheats
- and of course, repair opcodes



Also my college is retarded. They blocked the IRC port but downloading shitloads of videos/music and chatting on MSN or AIM is perfectly OK...

Comments: 0 - Leave a Comment

Link



Sunday, September 18, 2005


Yeah and I finished the disassembler too :) but the memory viewer is fuckorzed :(

Comments: 4 - Leave a Comment

Link



Saturday, September 10, 2005


Still doesn't function 100% and the font is way too small, but still HOORAY!

Comments: 6 - Leave a Comment

Link



Tuesday, September 6, 2005
Well college started today. I'm going to Seneca at Don Mills and Finch if anyone feels like stalking me. It takes me 2.75 hours to get there :/

It was OK today only 4 class in the afternoon and all together. Tomorrow it starts at 8 and ends at 5! I have a 4 hour break! Normally this would be OK, but I really don't have anything to do. I'm gonna go buy my books and mabye some other stuff at the nearby mall, but that hardly covers 4 hours. The school has a shitload of computers, but I hate having people watch me work, mainly because my stuff is lightyears ahead of their shit and draws too much attention.

Anyway I'll definately be missing much of my "intro to C course". Let's just say the last week deals with "the complex switch statement " they don't even cover arrays till semester 2...

Even with all this I have finished the palette viewer! HOORAY!



And yes I'm able to create a GBA emulator in C++ having only been through a highschool VB course, because I rock.

Comments: 5 - Leave a Comment

Link



Monday, September 5, 2005
So anyway the reason I haven't updated this thing(with any real posts) is because I've been trying to rewrite the graphics core so it wasn't a complete hack.

First attempt:
There are 4 256x256 background textures and 12 sprite textures(due to various sizes). To write a pixel I had to lock each one, plus I had to do the conversion between B5G5B5(GBA format) and A1R5G5B5 for each write. When (finally) done with the texture I would use the D3DXsprite interface to draw it. I got stuck here when it came to rotation and alpha blending.

Second:
The screen is one big 256x256 byte array and I'm using a D3DFMT_P8 surface. It was great at first and really fast. Then I got to adding the second palette. I had to put 512 colours on a P8 surface and well that didn't work too well.

Third:
A big 256x256 long array using A8R8G8B8 format. Rather than do the conversions per pixel I just have a 512 long array and calculate them at vblank. So to write a pixel I just do: "ScreenMemory[Y][X]=Palette[Number]" not as fast as P8 but multiple palettes and alpha blending shouldn't be an issue.

And to render the screen now instead of multiple D3DXSprite calls I can just:

BBuffer.GetBackBuffer(0);
TileSrfc.LoadMemory<unsigned long>((unsigned long *)ScreenMemory,1024,D3DFMT_A8R8G8B8,D3DX_FILTER_NONE,NULL);
TileSrfc.Copy(0,0,240,160, BBuffer);
BBuffer.Release();

(I made my own surface class)

Here's another screenshot to arouse you:



(again this isn't the actual game, just a dump of the video ram)

(the shitty FPS is from D3D streching the backbuffer, at 1x it's 60FPS)

Comments: 3 - Leave a Comment

Link



Saturday, August 27, 2005
So we were printing these Telus ads at work yesterday and well...



Well I think it's funny so if you don't your opinion is wrong.

Comments: 3 - Leave a Comment

Link



Wednesday, August 17, 2005
Somewhat long update with no pics, sorry :(

Well it turns out the problem was not with MOV, but with LDR. See my log class was outputting the correct opcode and mnemonic, but the results from the next instruction >_< I fixed that and pretty much restructured(not really rewrite) the ARM header file. So LDR works now, but only for ARM, the THUMB version is still messed. I actually was able to see the intro screens for some demos before the thing crashed so something is working OK in there. I tried running noaktree's Mortal Konsole, but it's in C++ and C++ GBA programs do some funky tricks at startup and well just won't work(yet).

Rather than continue messing with opcodes until I'm 70, I'm going to work on the GUI end of things. Well creating child windows wasn't exactly easy.

Win32: First I tried the normal Win32 way like I do with my main window. I added WS_CHILD and the parents handle, but nothing. I did everything MSDN and other sites said for days but the damn child window never appeared.

wxWindows: Heard alot about this and the screenshots looked real snazzy. About 3MB through the download I read about what I have to do in order for it to work with Dev-C++. Download cancelled.

MFC: Looked at some tutorials. Put a gun to my head but decided it wasn't worth the mess.

WTL(Windows Template Libray): Same as MFC, but the tutorials made it look a little easier and by this point I'd wasted to much time and didn't care. Downloaded only to find out it doesn't come with atlbase.h and neither does Dev-C++. Blah.

Dialog boxes: While looking for altbase and ran across a simple tutorial on dialong boxes. It seemed pretty easy. I copy the dialogproc function into main.cpp and the dialong details into the resource file. Had to look up the value of each windows style in winuser.h though because the stupid GCC resource compiler can't understand OR. THE COMPILE BUTTON WAS PUSHED AND MAGIC SPEWED FORTH! Now how do I add Direct3D to a dialog box?

Comments: 2 - Leave a Comment

Link



Sunday, August 7, 2005
Well I've been really busy at work, but I managed to get sprites and tile backgrounds working.



(All the program does is load the sprites and tiles to VRAM. Mario does not actually move)

Not all the features have been implemented. For example the coin sprite in the top part of the screen should be scaled down.

Still haven't been able to run anybody elses programs.
I've been doing some run-time disassembling and it seems like most of the opcode functions are TOTALLY SCREWED! For example "mov r7,r3" which should move the value of register 3 into register 7 instead loads register 0 with totally random values and I have no idea why

Comments: 4 - Leave a Comment

Link



Sunday, July 17, 2005
Well we've been really busy at work lately which caused me to work 9 and 10 hour days. It takes me an hour and a-half to get there and back plus when I get home I eat dinner and shower so I don't have much time for the computer. Most nights I didn't even turn it on.

I was able this weekend to get graphics modes 4 and 5 done. I've got DMA transfers almost done except I'm using a for loop which is probably too slow, but I can optimize later. The THUMB decoder and disassembler are done but there aren’t any THUMB functions implemented yet. For those of you not familiar with the ARM it has two modes: ARM and THUMB. In ARM opcodes are 32-bit and can take many operands, in THUMB opcodes are 16-bit.

Hopefully I won't have that much work this week so I can get sprites done and make a small game(probably just tic-tac-toe or something).



For those interested in testing out mode 4 I made a little plasma demo. The palette isn't smooth so it doesn't really look right but it still shows that mode 4 works. Just download FatMan.zip and drag plasma.gba into FatMan.

Comments: 0 - Leave a Comment

Link



Saturday, July 9, 2005
YEAH MODE 3 WORKS!





If you want to try it out just download FatMan.zip and drag Hitler.gba into FatMan.exe

Comments: 1 - Leave a Comment

Link



Monday, July 4, 2005
SEX

Ok now that I've got your attention, go into the GDS showcase and download my masterpiece, MacMan II. If you don't download it I'll have to cry myself to sleep tonight and nobody wants that. Here's a screenshot to get your cursor moving:



Also I've been working on a GBA emulator named FatMan for the past month. So far it only has:

- All ARM opcodes except for the co-processor ones.
- Full ARM disassembler(as shown in screenshot).

I've been able to load a 16-bit image into the video RAM, but since it's a console app I couldn't really display it. I've started on the Windows version and hope to have graphics modes 3 and 5 done. They should be pretty easy to emulate since they're just linear 16-bit bitmap modes. Once THUMB opcodes and DMA transfers are done I should be able to run any mode 3 or 5 GBA game.

@textarea 0x08000000
mov r0,#0
ldr r5,=0x02223333
ldr r10,=0x04223357
ldr r12,=0x88889999
ldr r3,=0x02000100
stm r3,{r5,r10,r12}
mov r5,#42
mov r10,#255
mov r12,#0x1000
ldmia r3!,{r5,r10,r12}
ldr r0,=loop
loop:
bx r0
@pool
@endarea         









END COMMUNICATION

Edit: Damn GIFs. They look fine in the PhotoShop preview, but in anyother program they're totally messed up.

Comments: 4 - Leave a Comment

Link



Monday, June 13, 2005
Well I've nearly gotten level 2 done :( At this rate I should be finish sometime next millennium. I started a huge project when I had ass-loads of time, but now I have none. The project is cancelled.

Also I might enter the 4 elements contest although I have no idea what to make. It will definitely have Pirates and Robots because they're the coolest. Never really liked ninjas. Zombies shouldn't even be part of the four. They have no real character and are almost always just an enemy to mow down.

Space Aliens > Zombies

Comments: 3 - Leave a Comment

Link



Tuesday, June 7, 2005
Well I got the job. I actually started yesterday, but I collapsed before reaching my computer. It's pretty much just packaging big ass crates and then moving them outside to be picked up. It sounds a lot easier than it is. Right now my feet feel like there's a fire under them.

Yeah so any programming will have to wait till the weekend since my favorite pass time is now sleeping.



Comments: 4 - Leave a Comment

Link



Sunday, June 5, 2005
I had to go up north this weekend so I didn't get much done. The reason wasn't actually going up north. In my haste I only saved the sprites and my engine(in another folder) to my USB disk and forgot main.cpp.


I have a job interview at a printing shop/factory in Toronto tomorrow. Looks like my many years of sloth will be at an end.

Comments: 0 - Leave a Comment

Link



Wednesday, June 1, 2005
Damn that took forever. If I had walked to California, handed rhino the $50 and walked back to Toronto I would have had GDNet+ sooner than waiting for my electronic payment.

And where are the secret forums? Probably didn't get invited because I still use WinME


Anyway right now I'm working a Ogre Battle clone, but with Ogre Tactics type battle scenes because the battles in Ogre Battle were so damn boring.

Here's where the isometric battle engine is at now:

The donkey will be an actual unit because donkeys rule.

This is the first level. Most of the levels will be much bigger than this. The reason it's so small is because it's just a simple tutorial level with only three quests.

McLevel Level Editor:

In game:


That's really all I've got done as I've only started a week ago. I'll put some of my (rather crappy) games onto the GDS soon.

(also sorry 56k users.)

Comments: 7 - Leave a Comment

Link

Page:   1 2 »»

All times are ET (US)

 
S
M
T
W
T
F
S
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

OPTIONS
Track this Journal

 RSS 

ARCHIVES
November, 2005
October, 2005
September, 2005
August, 2005
July, 2005
June, 2005