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.


Messages - Agent Smith

Pages: [1] 2
1
Useful links / Re: 6502 ASM
« on: April 01, 2008 »
What a coincidence :) I'm currently writing a 6502 Simulator, in Forth.
I still have my old Apple IIe, Atari 800XL and I recently bought a replica Apple I kitset, which I've yet to put together.

Actually, the very first computer I ever owned was a Sinclair ZX81, but I never much liked the Z80.
What I really want is to build my own Atari 800 laptop, like Ben Heckendorn.

Yep the 6502 was pretty basic alright, but it was so dirt cheap when it came out, all the home computer vendors (and hobbyists) jumped for it, so it really helped foment the golden era of home computing.

However, IMO the best CPU of the 8-bit era was undoubtedly the 6809.


2
ASM / Re: As simple as it gets
« on: March 03, 2008 »
I can't see how that program works at all  ???
Won't the data variables be interpreted as opcodes, and executed as such when control returns from initial int 10h ?

I think maybe a jmp over them is needed, or locate them after the executable code.

3
General chat / Re: MacBook
« on: November 01, 2007 »
Hi benny!

I was originally going to get a sexy black MacBook, but in the end I went with a MacBook Pro as the MacBook's integrated graphics hardware isn't really up to running top-end 3D games. I switched to Mac when Apple switched to Unix (Darwin is basically an open-source port of BSD Unix).

I currently have installed a 250GB HDD, set up for triple book with OS X/Windows XP Home/Ubuntu Linux.
Battery lasts about 4-5 hrs normal usage, plus I bought a spare for those long flights/train trips.

There's a kick-ass dev environment called Xcode that comes free with OS X. It's an IDE for gcc with debugger (GUI front end for gdb), CHUD profiling tools, graphical GUI builder, etc. All good stuff. However, I'm a command-line junkie, so I tend to use vi with gcc most of the time. Note that Objective-C is the lingua franca for OS X if you want to do any serious applications programming using the native Cocoa frameworks, although you can still use C++ (if you're really that much of a masochist).

I haven't upgraded to Leopard yet, I'm still using Tiger (10.4). Only issue for x-platform dev is I can't write to my Windows partition directly from OS X (it's read-only). I can read both OS X and Windows partitions from Linux, but I think with the latest Ubuntu upgrade I'll be able to write to them as well (not sure if Leopard will also allow this).

Also, I haven't been able to compile TinyPTC yet for OS X (still haven't got around to sorting it out) but it works fine on my old PowerBook (PPC) Mac.

Bear in mind that I haven't got the lastest Core 2 Duo edition (mine's an earlier 2 GHz Core Duo) but one other issue is that the GPU is deliberately underclocked on OS X to keep the temperature under control. However when you boot Windows, it runs at full speed. I believe some users have experienced overheating problems when running the latest 3D games for long periods. You can download utilities to reduce the clock speed, but I've played Half-Life 2 for long periods without any problems, although the fan does rev like crazy. Not sure if this has been addressed in the latest hardware editions.

4
C / C++ /C# / Re: C++ Vs. Freebasic ?
« on: July 05, 2007 »
You might also take a look at the Computer Language Shootout.

5
ASM / Re: checkers
« on: April 14, 2007 »
rain_storm: If you want to reallly get into assembly, check out Menuet OS

The entire OS and all apps are written in 100% assembly (with source code included for some).
There are also ports of Doom and Quake.

You don't need to install it on your HDD as the whole OS boots off a single floppy.

6
ASM / Re: Where to get some good ASM Tutorials
« on: March 19, 2007 »
 :P

7
ASM / Re: Fast Text Routine
« on: March 17, 2007 »
That's correct, the OS pushes a zero word onto the stack before jumping to the start of the program, so a near return will pass control back to PSP:0000, which always contains int 20h (Program terminate). This is actually a remnant from MS-DOS version 1.0, which was closely modelled on CP/M.

But exiting via int 21h, AH = 4C (Terminate with return code) became the officially 'approved' method from version 2 onwards.
My code should have really been:
Code: [Select]
  mov ax, 4c00h
  int 21h
  as the contents of AL are passed back as the return code.
As my code stands at the moment, 88 is passed back as the return value (i.e. ASCII code for 'X').

Oops  :-[ I hope this doesn't mean I'll have to forfeit my Karma  :'(
Shame on you all for not spotting my deliberate error! ;)






8
ASM / Re: Fast Text Routine
« on: March 16, 2007 »
This way might be faster (assembles to a 27 byte .com with Tasm/Tlink)

Code: [Select]
.MODEL tiny
.CODE
 ORG  100h
entry:
 mov  ax, 3       ; set 80x25 text mode (16 colors)
 int  10h         ; BIOS video services
 mov  ax, 0b800h  ; address of color screen
 mov  es, ax      ; ES holds destination segment
 xor  di, di      ; zero offset to start of buffer
 mov  ah, 15      ; color attribute (white on black)
 mov  al, 'X'     ; ASCII character to display
 mov  cx, 2000    ; number of words to store
 cld              ; auto-increment DI
 rep  stosw       ; store AX to ES:DI, CX times
 mov  ax, 4c00h   ; terminate with return code 0
 int  21h         ; call DOS
 END  entry

9
ASM / Re: colours in mode 13h
« on: March 15, 2007 »
Thanks for the link, and also for taking the time to enlighten this ignorant peasant - yes, the penny has dropped and I can certainly relate to the 'minimalist art' thing. In one sense this is programming in it's purest form.

I have to confess that I previously visited here solely out of interest in the general applicability of the programming techniques discussed, but you may have made a convert out of me  ;)

Time to dust off my old DOS-era assembly skills and have a crack at some of this good stuff myself!  :)

10
ASM / Re: colours in mode 13h
« on: March 15, 2007 »
Thanks. I see, so it's all about optimizing for size over speed. I'd never actually heard of Ralf Brown until I just googled  :-\
But is there an actual requirement for such micro-sized executables, or is it just about the hacker kudos to see who can shave off maximum bytes?

I mean, I could understand it if the target platform had only a couple of k of RAM installed, but for a modern PC with a couple of G's and a 32/64-bit OS?   ???
Please forgive my ignorance about the demo/intro scene - and don't get me wrong, I'm not trying to knock it or anything. I really admire what you guys do, just tryin' to understand the motivation behind it.

11
ASM / Re: colours in mode 13h
« on: March 14, 2007 »
Out of curiosity, why do you guys still use 16-bit real mode (with BIOS interrupts etc) for your assembly language stuff?  ???

Is it just because it's easier, or because of like the 'retro' appeal?

12
Who me? Hmm, probably not - because it doesn't look like enough has changed from the 2nd Edition to make it worthwhile.

TBH, I haven't actually gotten around to reading the 2nd Edition yet!  Mainly because I've decided to use D with SDL + OpenGL instead of C with Allegro (I already know C thoroughly anyway, it was just for using Allegro to make 2D games that I mainly bought it).

Maybe I'll come back to it when I've mastered D with SDL + OpenGL. It might be interesting to do some benchmarks to compare the relative performance of the two.
There was an earlier thread which asked the same question, but nobody seemed to have an answer at the time...

13
Actually, it's not just a straight reprint. In fact there are changes as I suspected, it being a new Edition.

Here is the new Table of Contents: Game Programming All-In-One (3rd Edition)

In summary, the changes from the 2nd Edition appear to be as follows:

Chapter 10: Programming Tile-Based backgrounds with Scrolling   

   becomes...

Chapter 11: Programming Tile-Based Scrolling Backgrounds Using MappyAL

Chapter 13: Vertical Scrolling Arcade Games, and
Chapter 14: Horizontal Scrolling Platform Games

   become...

Chapter 13: Creating a Tile-Based Scrolling Arcade Game


Chapter 18: Introduction to Artificial Intelligence

   becomes...

Chapter 19: Enhancing your Gameplay with Artificial Intelligence


Chapter 19: The Mathematical Side of Games

   becomes...

Chapter 18: Basic 3D Graphics Programming Using AllegroGL


New chapter:

Chapter 16: Multiplayer Programming Using TCP/IP Sockets

14
Hotshot, have you actually seen a copy of the 3rd Edition? 

Because I have the 2nd Edition and I'm curious to know exactly how much has changed.

There was quite a big change from the 1st Edition, which had a lot on C++ and DirectX, but this was all dropped in favour of C and Allegro in the 2nd Edition to focus more on game making.

So are you saying the 3rd Edition is just a straight reprint of the 2nd Edition? Or what, if anything has changed?

15
General chat / Re: Coders Workshop down.
« on: September 01, 2006 »
 ;D lol, my money is on this option:

Quote
Or perhaps Cobra is fucked?

I suspect that they've either run into dev problems and have had to seriously prune it's features, or Idigicon have looked at it and decided it doesn't really offer anything over existing products for the indie game developer.

Seems really Jack the way they just pulled the plug on the website without any advance notice, reason, or statement about when (or even if) it's going to be back online. It seems even the moderators were (and still are) completely in the dark.

I have a problem with the developer of Cobra. I mean, this guy has been hyping it up on that site for 2 years now, making all sorts of promises, stringing guys along, and now he pulls this stunt. I'm not even sure what the point of the announcement is. The damn thing still hasn't been released yet and he still hasn't committed to any date.

Maybe he's just preparing the ground for further disappointing announcements. I note he's been very coy about making any definitive statements, despite being asked pointedly on his own website, citing "contractual obligations". I mean, what are we talking about here for God's sake, cryptographic software for the NSA?

He also claims he's not touting his wares on BB.com but every time anyone says anything negative about Cobra he immediately leaps in to do some damage control.

16
Try Eclipse, with the CDT plug-in.

http://www.eclipse.org/

17
Pelles C is quite good  ;)

http://www.smorgasbordet.com/pellesc/

Or, you might like to try Digital Mars' C compiler...

http://www.digitalmars.com/

18
ASM / Re: Drawing a Line
« on: August 15, 2006 »
?

19
He seems to be suggesting that the only advantage D (or C#) has over C++ is automatic garbage collection.

20
ASM / Re: Drawing a Line
« on: August 15, 2006 »
I think you mean 0a000h

Pages: [1] 2