Source code collection

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post by Bregalad »

DTE decoding table is located at 3f060 in the ines ROM and have a size of 160 bytes for 80 DTE keys.
I guess the same with MTE could be as well compressed than huffmann (but the decoding table would be larger) and is much, much easyer to use.
The problem of your DOS program isn't the usage, it doesn't run at all (when I type huffpuff, the DOS command answer "Not executable programm" or something like that).
I consuled another book about structures and there also was an example with names, etc...
So a structure/union is a kind of buffer in the C language, but your assempler seems to do a mix between C and ASM and it's not easy to got it. If I'm unable to find a better doccumentation about it I may switch to another assemler for my project. (I tried it a lot, but a lot of stuff are frutrating for me).
Also, annonymous macros doesn't work at all, and I've done them exactly as in the exmple (the like i=0 render an error)
Useless, lumbering half-wits don't scare us.
SnowBro
Posts: 5
Joined: Mon Jan 10, 2005 7:10 pm

Post by SnowBro »

Bregalad wrote:I guess the same with MTE could be as well compressed than huffmann (but the decoding table would be larger) and is much, much easyer to use.
How exactly is MTE easier to use? As long as you have automated tools to encode and decode data, there really isn't any difference as far as actual usage.
Bregalad wrote:The problem of your DOS program isn't the usage, it doesn't run at all (when I type huffpuff, the DOS command answer "Not executable programm" or something like that).
Could you check this again and give the precise error message? I compiled huffpuff in the same manner as xorcyst, so if you downloaded the correct zip file (*.dos.zip) it should work. Are you on Windows XP?
Bregalad wrote:So a structure/union is a kind of buffer in the C language, but your assempler seems to do a mix between C and ASM and it's not easy to got it.
Structures/unions have the same semantics in my assembler as in C, to the best of my knowledge. But nobody's forcing you to use structures, and if you've gotten by without them before perhaps it's best to carry on like before. If you're on IRC or MSN, we could try having a more interactive session though, I bet that would clear up things a lot faster than using this messageboard.
Bregalad wrote:Also, annonymous macros doesn't work at all, and I've done them exactly as in the exmple (the like i=0 render an error)
Strange. I just assembled both examples without problem. Are you using the latest version of the assembler (1.4.5)? Could you give the precise error message?

Concerning the debugging-related problems of data/code relocation. If you give the --verbose option to the linker, it will print out the final physical address of each public symbol in your code, which should be of some help. But again, you can just use .EQU directives to map your RAM to avoid the automapping altogether.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post by Bregalad »

SnowBro wrote:How exactly is MTE easier to use? As long as you have automated tools to encode and decode data, there really isn't any difference as far as actual usage.
Yeah, you're right, with automated tools it souldn't be hard to use. The huffman prg render an error message as "the system can't run the specified programm". If I imput no argument, it just freezees. Yeah, I'm on windows XP.
Structures/unions have the same semantics in my assembler as in C, to the best of my knowledge. But nobody's forcing you to use structures, and if you've gotten by without them before perhaps it's best to carry on like before. If you're on IRC or MSN, we could try having a more interactive session though, I bet that would clear up things a lot faster than using this messageboard.
No, I've not any account on this kind of board. Sorry.
You're right, I'm not *forced* to use unions/structures, but it's still frustrating for me to use an assambler with may-amazing possibilities witout understand them.
Strange. I just assembled both examples without problem. Are you using the latest version of the assembler (1.4.5)? Could you give the precise error message?
No, I was with the 1.4.4 version, but there's no news like "fixed annomimus macros"
The error message was "unexepted instruction" on the line i=0.
Concerning the debugging-related problems of data/code relocation. If you give the --verbose option to the linker, it will print out the final physical address of each public symbol in your code, which should be of some help. But again, you can just use .EQU directives to map your RAM to avoid the automapping altogether.
OK Thanks.
Useless, lumbering half-wits don't scare us.
Guest

Re: Source code collection

Post by Guest »

tepples wrote:
Anonymous wrote:No, at the moment there's really no difference between "proc" and a normal label. However, I have fun ideas for it, such as being able to inline a function defined in another unit, or the linker being able to extract a single procedure from one unit, as opposed to having to link in the whole unit.
Sounds like .ifref in .CA65. In addition, CA65's .proc allows for procedure-local labels. Do you plan on adding that?
For example,

Code: Select all

.pad $FFFA - $
simulates absolute padding to $FFFA.
Perhaps I should just change ".pad XXXX" to mean ".dsb XXXX - $"
Such a change would at least help maintain consistency with x816. CA65, on the other hand, prefers that the linker script put a 6-byte "vectors" section into the ROM_C000 bank.
But I think records are a life-saver for user-defined bitfields, and especially the ability to initialize the fields like a normal structure and have the assembler do the tiresome shifting, ANDing and ORing for you. Check out "warp2d.h"; back in the old days I had to generate the packed bytes of (area, section, location) manually
If your assembler can handle the | operator, you don't need it. Define the masks in a header file, and OR them together in your constant data. Even better is to make a custom graphical editor for each data type, separate from your assembler.
I'm using Huffman coding for my text
I've read in Managing Gigabytes that a technique called "huffword", where each Huffman code maps to a word, provides good compression.
You can define a label to point to WRAM:

Code: Select all

.label wram = $6000
But you can't map an entire data segment to a specific location.
CA65 can.
However, you can use a structure, since a structure's field are guaranteed to be mapped sequentially in memory.
In fact, I use a technique like this in my GBA headers.
Thank you, I'm the only one who's used the assembler up until now I'm pretty sure, so I'm glad for all feedback on how others see it.
What do you plan on making your assembler do that CA65 doesn't already do?
Guest

Receiver

Post by Guest »

[quote][/quote]

So who collects it then? ;)
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

Am I the only person to notice that the example game's logic allows jumping in midair as long as your vertical velocity is zero?
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

Dwedit wrote:Am I the only person to notice that the example game's logic allows jumping in midair as long as your vertical velocity is zero?
Well, I had never noticed before, but now that you said it... I just had to check! =)
It really seems to behave like this... maybe he checks if the player is in the air based on the vertical velocity... wich will result in fake information at that exact point right beforte the player begins to descend.

The 1st platformer I programmed had that same (d)effect. I guess you gotta have a flag to tell if the player is in the air or not... checking the velocity is just not an accurate way to do it...

So, I guess that if you keep doing it at the right times you could go up to the ceiling, right? =)
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post by Bregalad »

tokumaru wrote: I guess you gotta have a flag to tell if the player is in the air or not...
You probably already have to have one, scince your player most probably don't have that same animation frame in air than on the ground. So a such flag is needed when checking witch animation frame should be used to draw the player.
Useless, lumbering half-wits don't scare us.
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

Bregalad wrote:You probably already have to have one, scince your player most probably don't have that same animation frame in air than on the ground. So a such flag is needed when checking witch animation frame should be used to draw the player.
Oh, yeah, I've been doing it like this for a long time... My characters don't jump mid-air anymore, for years now! =)
griever
Posts: 39
Joined: Thu Apr 05, 2007 1:34 pm

Post by griever »

Wow, that's pretty interesting, but snowbro's URLs don't work anymore! :evil: (404: Cannot find...) Maybe someone have backup or something? I can't find these files in the internet either!
User avatar
blargg
Posts: 3717
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Post by blargg »

I can't find these files in the internet either!
Remember, sometimes an internet takes a few days to go through e-mail. Maybe the tubes are clogged.
Lord Nightmare
Posts: 131
Joined: Wed Apr 05, 2006 10:12 am
Location: PA, USA
Contact:

Post by Lord Nightmare »

As long as they're small, I'd be happy to host these...
I also am interested in a copy.

Lord Nightmare
moc(t0d)liamtoh(t@)uhayravegj
"When life gives you zombies... *CHA-CHIK!* ...you make zombie-ade!"
griever
Posts: 39
Joined: Thu Apr 05, 2007 1:34 pm

Post by griever »

Yup, I've found it: Gavin had this stuff on his site, but it looks like, it's closed now.
Christuserloeser
Posts: 25
Joined: Fri May 06, 2005 7:04 pm
Contact:

Post by Christuserloeser »

I've mirrored most of these. Download this:

http://www.dcevolution.net/goto.php?id=65
http://www.dcevolution.net/cgi-bin/down ... EP_v11.rar

Burn to a CDR (or mount it) and browse its content. Should be in /Extra/Source/


-Chris
Post Reply