Emuforums.com

Go Back   Emuforums.com > General Discussion > Software Discussion
About Us Register FAQ Members List Calendar Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old February 26th, 2002   #1 (permalink)
"Greetings, citizen!"
 
password0k's Avatar
 
Join Date: Jan 2002
Location: between the computer and the TV
Posts: 475
I want to write a game...

Can I write my own ROM to run in an NES emulator?
__________________
SUBVERT THE DOMINANT PARADIGM.

"Remove her diseased charcoal, and stomp the equal hook." - random text generator

"Life throws **** at you and all you can do is your best to dodge it." - Me
IF YOU'RE NOT A MAGGOT, YOU'RE AS GOOD AS BREAD!.
password0k is offline   Reply With Quote
Old March 4th, 2002   #2 (permalink)
It's a Spinning Smile!
 
CKemu's Avatar
 
Join Date: Oct 2001
Posts: 5,220
From what I know 'yes' is the answer, u can write SNES games, Atari ST Games (I know I am writting one now in STOS Basic), and even N64 games as compilers are available, though getting it into ROM format such a *.z64 is alittle tricky and hard to find the tools to do it in.

Your best bet is to search google firstly on the CPU type used in the NES and then to appropriate assembler code (eg Atari ST is 68000 and the SNES is 65c816) then u can get manuals on the instruction sets and write your program in straight txt, then you will need to find a compiler, (shouldn't be too hard ) and converter to build a rom image, though the assembler I have for the SNES does that anyhow (*.smc). But if you can learn the asm language or specific machine code and compile/convert it you can write games for the real NES or NES emus such as Nesticle, emus in this case are incredibly usefull as you can pre test your games.

I don't know much on NES coding but I'll look some sources up 4 u, anything on SNES and Atari ST (STOS coding) I am more than happy to help u with!
__________________

» Beta Tester for PCSX2 | ZeroGS KOSMOS | Satourne | nullDC | Dolphin | Misc Projects «
» AMD64 X2 4400+ 939 1MB L2 @ 2.20GHz | GeForce 8800 GTX 768: 575/1800 | 2GB OCZ DC RAM @ 2-3-2-5 | 768GiB HDD «
CKemu is offline   Reply With Quote
Old March 4th, 2002   #3 (permalink)
Who Da Gnome?
 
Bgnome's Avatar
 
Join Date: Apr 2001
Location: At Home
Posts: 2,441
you can make your own game. they are called "homebrews." you do need developer info tho.. maybe zophar.net could be a good place to start.
__________________
May the Gnome™ be With You
Bgnome is offline   Reply With Quote
Old March 4th, 2002   #4 (permalink)
It's a Spinning Smile!
 
CKemu's Avatar
 
Join Date: Oct 2001
Posts: 5,220
Hey just make sure that u put (PD) on the zip and publish it on the web!!!!
__________________

» Beta Tester for PCSX2 | ZeroGS KOSMOS | Satourne | nullDC | Dolphin | Misc Projects «
» AMD64 X2 4400+ 939 1MB L2 @ 2.20GHz | GeForce 8800 GTX 768: 575/1800 | 2GB OCZ DC RAM @ 2-3-2-5 | 768GiB HDD «
CKemu is offline   Reply With Quote
Old March 5th, 2002   #5 (permalink)
"Greetings, citizen!"
 
password0k's Avatar
 
Join Date: Jan 2002
Location: between the computer and the TV
Posts: 475
Hmmmmm...

Okay, I'll start searching. What are the names of some good compilers/converters. (I am not interested in making a real cartridge, as I do not have the hardware. I just wanna write ROMs.)
How much harder is an SNES ROM to write?
__________________
SUBVERT THE DOMINANT PARADIGM.

"Remove her diseased charcoal, and stomp the equal hook." - random text generator

"Life throws **** at you and all you can do is your best to dodge it." - Me
IF YOU'RE NOT A MAGGOT, YOU'RE AS GOOD AS BREAD!.
password0k is offline   Reply With Quote
Old March 5th, 2002   #6 (permalink)
chillypacman
Guest
 
Posts: n/a
Unhappy damn it i have all the software to program but i dont have the brains to do so!

Oh well I'm learning I'm learning
  Reply With Quote
Old March 5th, 2002   #7 (permalink)
"Greetings, citizen!"
 
password0k's Avatar
 
Join Date: Jan 2002
Location: between the computer and the TV
Posts: 475
Well why don't you tell me where to get them (if you're allowed to) and maybe we can team up.
__________________
SUBVERT THE DOMINANT PARADIGM.

"Remove her diseased charcoal, and stomp the equal hook." - random text generator

"Life throws **** at you and all you can do is your best to dodge it." - Me
IF YOU'RE NOT A MAGGOT, YOU'RE AS GOOD AS BREAD!.
password0k is offline   Reply With Quote
Old March 5th, 2002   #8 (permalink)
It's a Spinning Smile!
 
CKemu's Avatar
 
Join Date: Oct 2001
Posts: 5,220
Re: Hmmmmm...

Quote:
Originally posted by password0k
Okay, I'll start searching. What are the names of some good compilers/converters. (I am not interested in making a real cartridge, as I do not have the hardware. I just wanna write ROMs.)
How much harder is an SNES ROM to write?
The tricky compiler for the SNES is good and perhaps the best u will get your hands on for the moment, I'll post later with infos or PM me with ya email, and i'll send u the tools u will need including manuals.

The SNES is fairly easy to write for. about the same level as NES/MEGA DRIVE coding, its fairly easy to pick up, I have small amount of time left online, i'll post more details later!! sowwy
__________________

» Beta Tester for PCSX2 | ZeroGS KOSMOS | Satourne | nullDC | Dolphin | Misc Projects «
» AMD64 X2 4400+ 939 1MB L2 @ 2.20GHz | GeForce 8800 GTX 768: 575/1800 | 2GB OCZ DC RAM @ 2-3-2-5 | 768GiB HDD «
CKemu is offline   Reply With Quote
Old March 7th, 2002   #9 (permalink)
chillypacman
Guest
 
Posts: n/a
Sorry its not the kind you get online

its the kind wich u go to the shops and get wow are they expensive i have microsoft visual studio enterprise edition wich costs about $1500 u.s.
  Reply With Quote
Old March 7th, 2002   #10 (permalink)
chillypacman
Guest
 
Posts: n/a
u can get suns java

Its pretty nice (as i hear) pretty simple too. just search for it and u should find it. (it wont take u on a wild goose chase)
  Reply With Quote
Old March 8th, 2002   #11 (permalink)
"Greetings, citizen!"
 
password0k's Avatar
 
Join Date: Jan 2002
Location: between the computer and the TV
Posts: 475
You can write ROMs in JAVA?!? I think we are misunderstanding each other.
__________________
SUBVERT THE DOMINANT PARADIGM.

"Remove her diseased charcoal, and stomp the equal hook." - random text generator

"Life throws **** at you and all you can do is your best to dodge it." - Me
IF YOU'RE NOT A MAGGOT, YOU'RE AS GOOD AS BREAD!.
password0k is offline   Reply With Quote
Old March 8th, 2002   #12 (permalink)
It's a Spinning Smile!
 
CKemu's Avatar
 
Join Date: Oct 2001
Posts: 5,220
Hmm roms in JAVA, NO WAY unless they handle 65c816 code!!!

Anyhow my email is $$£$ so password0k i'll send u the material I have soon, oh and by the way u can write N64 roms in C++ (albeit there are changes to the language, and special commands for the N64)

Here's some SNES source code by 'Yoshi', this will show u what ya getting in to

LONG POST --------------------------------------------------------------------------

; ************************************************** *********
; *** Code written for Tricks Assembler (TRASM) v1.11 by ***
; *** Norman Yen. ***
; ************************************************** *********
; *** This code written by Yoshi of Digital Exodus. If ***
; *** any of this code is used, please make sure to give ***
; *** me thanks or recognition somehow in your product. ***
; ************************************************** *********
; *** This piece of code does quite a few things, ranging ***
; *** from multi-BG scrolling to DMA transfers to using ***
; *** the colour +/- registers to make the BGs different. ***
; *** I was trying to figure out how to get that "overlay ***
; *** see-through" look, but failed. If anyone knows, do ***
; *** contact me. Thanks. ***
; ************************************************** *********

org $008000

name 'iNFiNiTY - by Yoshi'
cou 1 ; USA
ver 1

int
res = Main ; Reset vector is @Main
nmi = NMI ; NMI vector is @NMI
end

; ************************************************** *********
; *** Constants ***
; ************************************************** *********
Delay equ 200 ; Wait 200 VBL cycles.
TileLen equ 5856 ; Length of tile data
MSource1 equ M1 ; Address of music
MSource2 equ M2 ; Address of music (2nd part?)

; ************************************************** *********
; *** Direct page (DP) variables ***
; ************************************************** *********
DPLoc equ $0000 ; Start DP at $00/0000

BG0X equ $0 ; Scroll registers...
BG0Y equ $0+2 ; ...
BG1X equ $0+4 ; ...
BG1Y equ $0+8 ; ...
BG2X equ $0+10 ; ...
BG2Y equ $0+12 ; ...
JoypadLo equ $0+20 ; Joypad #1
JoypadHi equ $0+21 ; ...
FadeBase equ $0+22 ; Starting fade value
Fade equ $0+23 ; Ending fade value
ADown equ $0+24 ; 1 = A button being "held down"

; ************************************************** *********
; *** Startup code ***
; ************************************************** *********

Main sei
phk
plb
clc
xce

rep #$30
lda.w #DPLoc ; Direct page shall rule the world.
tcd

stz BG0X
stz BG0Y
stz BG1X
stz BG1Y
stz BG2X
stz BG2Y
stz ADown

jsr init_snes ; "Initialize" the SNES
jsr Music ; Play music (grin)

rep #$10
lda #%00000001
sta $2105 ; MODE 1

lda #$00 ; BG1 = VRAM $0000 (32x32)
sta $2107

lda #$00 ; BG2 = VRAM $0000 (32x32)
sta $2108

lda #$11 ; BG1 & BG2 = $1000
sta $210b

lda #%00000011 ; BG2 & BG1 = main screens
sta $212c ; ...

lda #%00000001 ; BG1 = sub-screen
sta $212d

lda #%00000000
sta $2130

lda #%00000001 ; Affect BG1
sta $2131

lda #%10000011 ; Colour parms (BGR, 00, value)
sta $2132

stz $2133 ; Screen setting register

lda #%00000001 ; 3.58Mhz access cycle
sta $420d

ldx.w #$0000
stx $2116
ldx.w #$1801
stx $4300
ldx.w #MapData&$FFFF
stx $4302
lda #{MapData<<8}&$FF
sta $4304
ldx.w #2048
stx $4305
lda #$01
sta $420B

ldx.w #$1000
stx $2116
ldx.w #$1801
stx $4300
ldx.w #TileData&$FFFF
stx $4302
lda #{TileData<<8}&$FF
sta $4304
ldx.w #TileLen
stx $4305
lda #$01
sta $420B

stz $2121 ; Start @ colour 0.

ldx.w #$2200
stx $4300
ldx.w #colData&$FFFF
stx $4302
lda #{colData<<8}&$FF
sta $4304
ldx.w #32
stx.w $4305
lda #$01
sta $420B

lda #$0A ; Fade up from 0 to $A.
sta Fade ; ...
stz FadeBase ; ...
jsr FadeIn ; ...

ldx.w #200 ; Wait awhile (or something).
- jsr WaitVBL ; This actually waits for the
dex ; VBL to pass by {X-index} times.
bpl - ; ...

lda Fade ; Switch Fade & FadeBase, then
sta FadeBase ; fade up from $A to $F. Wow.
lda #$0F ; ...
sta Fade ; ...
jsr FadeIn ; ...

lda Fade ; Switch Fade & FadeBase again,
sta FadeBase ; then fade out. Cool effect.
stz Fade ; ...
jsr FadeOut ; ...

ldx.w #200
- jsr WaitVBL
dex
bpl -

lda #$0A ; Fade up from 0 to $A.
sta Fade ; ...
stz FadeBase ; ...
jsr FadeIn ; ...

lda #$81 ; Enable auto joypad/NMI
sta $4200 ; access.

; ************************************************** *********
; *** The following loop is what's done "realtime" - this ***
; *** means all of this is calculated over and over NOT ***
; *** inside the NMI or any other interrupt. ***
; ************************************************** *********

cli ; Start interrupts.
MainLoop wai
lda JoypadHi
bit #$08
beq NotUp

pha
lda #1
cmp ADown
bne Just1a
inc BG1Y
Just1a inc BG1Y
pla

NotUp bit #$04
beq NotDown

pha
lda #1
cmp ADown
bne Just1b
dec BG1Y
Just1b dec BG1Y
pla

NotDown bit #$02
beq NotLeft

pha
lda #1
cmp ADown
bne Just1c
inc BG1X
Just1c inc BG1X
pla

NotLeft bit #$01
beq NotRight

pha
lda #1
cmp ADown
bne Just1d
dec BG1X
Just1d dec BG1X
pla

NotRight bra MainLoop

; ************************************************** *********
; *** Miscellaneous routines ***
; ************************************************** *********
FadeIn pha
lda FadeBase
- inc
sta $2100
jsr WaitVBL
jsr WaitVBL
cmp Fade
bne -
pla
rts

FadeOut pha
lda FadeBase
- dec
sta $2100
jsr WaitVBL
jsr WaitVBL
cmp Fade
bpl -
pla
rts

WaitVBL pha
- lda $4210
bpl -
lda $4210 ; Reset it
pla
rts

; ************************************************** *********
; *** The NMI is located here. This is what's done via an ***
; *** interrupt. Don't worry too much about it. ***
; ************************************************** *********
NMI php
pha
phx
rep #$10 ; INDEX=16
sep #$20 ; ACC=8

inc BG0X ; Automatically scroll BG3.
dec BG0Y

lda BG0X
sta $210D
lda BG0X+1
sta $210D

lda BG0Y
sta $210E
lda BG0Y+1
sta $210E

lda BG1X
sta $210F
lda BG1X+1
sta $210F

lda BG1Y
sta $2110
lda BG1Y+1
sta $2110

lda BG2X
sta $2111
lda BG2X+1
sta $2111

lda BG2Y
sta $2112
lda BG2Y+1
sta $2112

- lda $4212
and #$01
bne -

ldx.w $4218
stx JoypadLo

stz ADown
lda JoypadLo
bit #%10000000
beq Next2
lda #1
sta ADown

Next2 plx
pla
plp
rti

; ************************************************** *********
init_snes
sep #$20
lda #$80
sta $2100 ; Screen off, 0 brightness.
stz $2101
stz $2102
stz $2103
stz $2104
stz $2105
stz $2106
stz $2107
stz $2108
stz $2109
stz $210a
stz $210b
stz $210c
stz $210d
stz $210d
stz $210e
stz $210e
stz $210f
stz $210f
stz $2110
stz $2110
stz $2111
stz $2111
stz $2112
stz $2112
stz $2113
stz $2113
stz $2114
stz $2114
lda #$80
sta $2115
stz $2116
stz $2117
stz $211a
stz $211b
lda #$01
sta $211b
stz $211c
stz $211c
stz $211d
stz $211d
stz $211e
lda #$01
sta $211e
stz $211f
stz $211f
stz $2120
stz $2120
stz $2121
stz $2123
stz $2124
stz $2125
stz $2126
stz $2127
stz $2128
stz $2129
stz $212a
stz $212b
stz $212c
stz $212d
stz $212e
stz $212f
stz $4200
lda #$ff
sta $4201
stz $4202
stz $4203
stz $4204
stz $4205
stz $4206
stz $4207
stz $4208
stz $4209
stz $420a
stz $420b
stz $420c
stz $420d
rts

Music src music

coldata bin pic16.col
mapdata bin pic16.map
tiledata bin pic16.set

M1 bin music1.bin
M2 bin music2.bin
__________________

» Beta Tester for PCSX2 | ZeroGS KOSMOS | Satourne | nullDC | Dolphin | Misc Projects «
» AMD64 X2 4400+ 939 1MB L2 @ 2.20GHz | GeForce 8800 GTX 768: 575/1800 | 2GB OCZ DC RAM @ 2-3-2-5 | 768GiB HDD «
CKemu is offline   Reply With Quote
Old March 8th, 2002   #13 (permalink)
"Greetings, citizen!"
 
password0k's Avatar
 
Join Date: Jan 2002
Location: between the computer and the TV
Posts: 475
feh, C is one of the languages I don't know, but I'll cope. And I'll be studying it next semester. I think that's the summer semester.
Anyway, I don't want to write a N64 game. I want to make a dinky side scroller for a friend.

/edit/And I DO know asm.
__________________
SUBVERT THE DOMINANT PARADIGM.

"Remove her diseased charcoal, and stomp the equal hook." - random text generator

"Life throws **** at you and all you can do is your best to dodge it." - Me
IF YOU'RE NOT A MAGGOT, YOU'RE AS GOOD AS BREAD!.

Last edited by password0k; March 8th, 2002 at 03:17.
password0k is offline   Reply With Quote
Old March 8th, 2002   #14 (permalink)
It's a Spinning Smile!
 
CKemu's Avatar
 
Join Date: Oct 2001
Posts: 5,220
well then ur gonna have noo probs..!!!!!

PS: C is a piece of cake aslong as u keep track of ya sub routines, and the object flow/structure but nothing more complex than ya proberbly used to!
__________________

» Beta Tester for PCSX2 | ZeroGS KOSMOS | Satourne | nullDC | Dolphin | Misc Projects «
» AMD64 X2 4400+ 939 1MB L2 @ 2.20GHz | GeForce 8800 GTX 768: 575/1800 | 2GB OCZ DC RAM @ 2-3-2-5 | 768GiB HDD «
CKemu is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT. The time now is 23:51.

© 2006 - 2008 Emu Forums | About Emu Forums | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.7.0 Release Candidate 3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5