It is currently Fri Oct 20, 2017 8:13 pm

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 291 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 20  Next
Author Message
PostPosted: Wed Feb 05, 2014 3:11 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19112
Location: NE Indiana, USA (NTSC)
byuu wrote:
For what it's worth, I am open to changing my SPC700-6502 syntax if anyone wants to discuss it.

I'll start a new topic about it.

Quote:
65816 already uses , for + for some mindfucked reason

Probably because + is already taken by expressions: lda label+5,x

Quote:
and some interesting problems like "ora" not really applying to the non-A or modes

Which is why ARM went to orr.


Top
 Profile  
 
PostPosted: Wed Feb 05, 2014 8:25 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
tepples wrote:
byuu wrote:
65816 already uses , for + for some mindfucked reason

Probably because + is already taken by expressions: lda label+5,x

Accepting + leads to the the odd restriction that you can only add the index register as the last item in an expression. Comma is the standard argument separator for assembly, and indexed modes have a separate argument: what register to index via.

byuu wrote:
and some interesting problems like "ora" not really applying to the non-A or modes

I read that companies sued others or some legal bullshit over mnemonics back then, so everyone tried to make their own. That's what I've always explained to myself as to why they didn't just use or. That and their appreciated goal of making all mnemonics three characters.


Last edited by blargg on Wed Feb 05, 2014 10:32 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Feb 06, 2014 1:48 am 
Offline

Joined: Mon Mar 27, 2006 5:23 pm
Posts: 1338
> Which is why ARM went to orr.

That's what I ended up using for the non-A based ones. I left ora for consistency with 65816's ora.

> Probably because + is already taken by expressions: lda label+5,x

lda label+5+x would have been fine. You could also technically allow lda label+x+5 if you wanted to write a more complex parser. Both would require reserving a/x/y/s, and not allowing their use in user-made labels.

At any rate, even if we accept the justification, what do we do about opcodes that legitimately need commas for operand separators on the SPC700? And technically, MVN/MVP on the 65816.

My idea was to use =. Maybe a good one, maybe not.

bbs dp:bit=target
bne dp,x=target
orr dp=#imm

Added benefit of making the "dest,src or src,dest" ordering more clear.

> I read that companies sued others or some legal bullshit over mnemonics back then, so everyone tried to make their own. That's what I've always explained to myself as to why they didn't just use or. That and their appreciated goal of making all mnemonics three characters.

I figured they went with ora because or would have been the only mnemonic that wasn't exactly three letters.

Say what you will on mnemonics, but I've always really appreciated the visual operand alignment without needing to pad opcode names with spaces or tabs. When you get into Intel-era 20-letter-long AVX instructions, it's downright infuriating.

But yeah exactly. This is why the SPC700 has that half-assed, hideous mnemonic set. They knew they'd be sued for ripping off the 6502.

If I were designing it, I would have used ior (inclusive or.)


Top
 Profile  
 
PostPosted: Thu Feb 06, 2014 10:12 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19112
Location: NE Indiana, USA (NTSC)
byuu wrote:
At any rate, even if we accept the justification, what do we do about opcodes that legitimately need commas for operand separators on the SPC700? And technically, MVN/MVP on the 65816.

Do these opcodes also happen to use indexed addressing?

Quote:
If I were designing it, I would have used ior (inclusive or.)

That looks like "immediate or" to me ever since I saw MIPS in college.


Top
 Profile  
 
PostPosted: Thu Feb 06, 2014 1:45 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
byuu wrote:
I figured they went with ora because or would have been the only mnemonic that wasn't exactly three letters.

IOR = inclusive or
EOR/XOR = exclusive or

Quote:
Say what you will on mnemonics, but I've always really appreciated the visual operand alignment without needing to pad opcode names with spaces or tabs. When you get into Intel-era 20-letter-long AVX instructions, it's downright infuriating.

No disagreement there. Coding on variable-length mnemonic assemblies is never pleasant, unless you want to depend on your editor to have custom tab widths or custom tab stops and tab between the mnemonic and operands.

Quote:
If I were designing it, I would have used ior (inclusive or.)

Haha.


Top
 Profile  
 
PostPosted: Thu Apr 10, 2014 12:43 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2293
It shouldn't be that difficult to develop an SNES game that looks like an NES game. You can use 128 8x8 sprites without the need of dealing with the extra 32 bytes, and you don't need to use 16-bit mode or use more than a single bank.

Also, is HLL a standard language that Nintendo uses, or does it refer to any high level language in general assuming that is what HLL stands for.


Top
 Profile  
 
PostPosted: Thu Apr 10, 2014 1:05 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19112
Location: NE Indiana, USA (NTSC)
I think "HLL" refers to any high-level language. And as I understand how nocash's worldview connects to the ARM-powered platforms supported by his emulators, "HLL" in this post probably means C or the less RAM-heavy parts of C++.


Top
 Profile  
 
PostPosted: Wed Apr 16, 2014 8:12 am 
Offline

Joined: Tue Jul 12, 2011 10:58 am
Posts: 264
The state of development tools coupled with the expertise needed to create games for the SNES pretty much guarantees it's a niche within a niche for homebrew development.

We need both assembly gurus and amateur 3rd generation language capable homeworkers to create a thriving scene.

Sadly, the last effort to lower the bar on SNES game development has been abandoned twice:
http://www.snesgamemaker.comeze.com/

Anyone with knowledge of the 65816 flavor of wla could pick up the pieces and add functionality to it. Rejuvenate the project and grow the homebrew community.


Top
 Profile  
 
PostPosted: Wed Apr 16, 2014 12:35 pm 
Offline
User avatar

Joined: Sun May 27, 2012 8:43 pm
Posts: 1306
tepples wrote:
Bregalad wrote:
Or just rip samples out of SNES games :)

And open yourself to a lawsuit just as much as if you had ripped the Mario sprites out of Super Mario World.


This is blown out of proportion. If the use of the dinky samples from Super Mario World are comparable to Mario's direct likeness, then something is wrong here. I've come across dozens of POS systems in small stores and gas stations that use the ring, drowning, and goalpost sound effects ripped straight out of Sonic the Hedgehog. Surprise surprise, nobody's upset! Those are actual recognizable sounds. Using an instrument sample from a SNES game will get nobody in trouble, especially since the game likely is not being sold. If someone uses a Mario sprite to teach themselves how to manipulate sprites for a demo, that's absolutely fine. A single sample of an instrument used in a part of one particular game is not going to tangle anyone's undergarments.

If needed, take the sample, mar it up a bit until it's a little different, and use it.

I don't see why the issue of "THERE COULD BE A LAWSUIT" is so often an issue that gets excitedly brought up.


Top
 Profile  
 
PostPosted: Wed Apr 16, 2014 1:00 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2293
I remember trying to explain to the maker of snesgamemaker that in order to display a sprite onscreen, you had to upload a sprite pattern table during initialization, upload the oam during vblank, clear unused oam entries AND calculate hi-oam at the end of active display, as well as having the "display sprite" subroutine, to display sprites. He was seriously confused by all these steps.

EDIT: I have an idea. Why don't we take the famous snes initiation code, and add the addition of a default color palette, default sprite and bg pattern table and default vram memory arrangement settings.

How's this as a default setting:

Code:
sprites: 8x8 and 16x16
bg mode: 1, with high priority bg3

vram layout:
$0000 sprite patterns
$2000 bg1 map (64x64)
$3000 bg2 map (64x64)
$4000 bg1 & bg2 patterns
$6c00 bg3 map (32x32)
$7000 bg3 patterns



Top
 Profile  
 
PostPosted: Wed Apr 16, 2014 4:50 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19112
Location: NE Indiana, USA (NTSC)
No idea why the maps have to be 64x64 instead of 64x32, which is enough for scrolling without artifacts. But if you could port my NES project template to the Super NES, that'd be great.


Top
 Profile  
 
PostPosted: Wed Apr 16, 2014 5:49 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2293
Okay, that's a good point. It lets all 4 BG layers fit from $2000-$3fff.

EDIT:
Okay, here is a modified version of the initialization routine. It also puts it in fast mode, all layers on main screen, and in active display, full brightness.


Attachments:
improved snes initiation.txt [4.57 KiB]
Downloaded 75 times
Top
 Profile  
 
PostPosted: Thu Apr 17, 2014 8:23 am 
Offline

Joined: Tue Jul 12, 2011 10:58 am
Posts: 264
I don't know anything about assembly. Is there any way to modify the InitSNES.asm to take advantage of your improved init routine psycopathicteen?

Here is the init used in SNESGameMaker (Located in C:\SNESGameMaker\Temp\Include)


Attachments:
InitSNES.asm [7.25 KiB]
Downloaded 71 times
Top
 Profile  
 
PostPosted: Thu Apr 17, 2014 1:42 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2293
I'll look into the code.

I want to know how you are assembling the code. Is it just a bunch of .asm files being assembled to a ROM individually, or are they using "includes."


Here's a question for others on this website. Is there a "correct" way to use NMI interrupts? In the last couple of projects I've been using an IRQ interrupt in the place of an NMI, because NMI interrupts could trigger late when the CPU is busy, causing a black bar to appear at the top of the screen, instead of the usual slowdown. If you keep the NMI interrupt flag set, it can interrupt the CPU while it's not finished with a frame, causing glitches, unless you reserve a byte of memory to signal if the frame is finished or not.

EDIT: Your code RTL after it clears wram. That would cause crashing, due to the stack being swiped out.


Top
 Profile  
 
PostPosted: Thu Apr 17, 2014 5:21 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2293
Okay, I'm finished with the snes initiation code. I even made text files ready to use as main and nmi code. Graphics should be stored in the $81xxxx and $82xxxx ROM banks, since each ROM bank is 32kB, it takes 2 banks to fill up 64kB of vram. I use xkas, if anyone has issues with wla or another assembler. If anyone finds a mistake, please tell me, and I'll fix it.

EDIT: No wonder nobody responded. I made two mistakes. The first is setting $2100 to $1f instead of $8f, the second is dma-ing both banks to address $0000 in VRAM. I'll post a correct version when I get home.

EDIT 2: Uploaded the corrected version. Hope people find this useful.


Attachments:
snes initialization.zip [2.41 KiB]
Downloaded 73 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 291 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 20  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: 133MHz, Google Adsense [Bot], lidnariq and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group