Software for the 65Org16.x (formerly 6502 SoC Project)
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
Ok, yes I see that now.
Bitwise has shown me how to modify it to extend the pure binary file size. Now I'll try what you suggested. Doesn't like the syntax I've entered from your example, but I'll mess with it for abit..
EDIT: Added link, corrected link, recorrected.
Bitwise has shown me how to modify it to extend the pure binary file size. Now I'll try what you suggested. Doesn't like the syntax I've entered from your example, but I'll mess with it for abit..
EDIT: Added link, corrected link, recorrected.
Last edited by ElEctric_EyE on Wed Oct 26, 2011 5:15 pm, edited 3 times in total.
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
Ok, here is the Makefile:
Code: Select all
#===============================================================================
# Portable 6502/65C02/65816 Assembler Definitions
#-------------------------------------------------------------------------------
# Update the followiung line to reflect where you have installed the ZIP file
# containing the JAVA classes.
65016_DIR = .
#===============================================================================
65016_JAR = $(65016_DIR)/65016.jar
AS65_CLASS = org.x6502.x65016.As65016
LK65_CLASS = org.x6502.x65016.Lk65016
LB65_CLASS = org.x6502.x65016.Lb65016
AS65 = java -cp $(65016_JAR) $(AS65_CLASS)
LK65 = java -cp $(65016_JAR) $(LK65_CLASS)
LB65 = java -cp $(65016_JAR) $(LB65_CLASS)
RM = erase
#===============================================================================
# Rules
#-------------------------------------------------------------------------------
.asm.obj:
$(AS65) $(AS65_FLAGS) $<
#===============================================================================
# Configuration
#-------------------------------------------------------------------------------
OBJS = \
boot.obj
LK65_FLAGS = \
-bss $$00010000-$$EFFFFFFF -code $$FFFFE000-$$FFFFFFFF
#===============================================================================
# Targets
#-------------------------------------------------------------------------------
all: boot.s19 boot.hex boot.bin boot.coe
boot.s19: $(OBJS)
$(LK65) $(LK65_FLAGS) -s19 -output $@ $(OBJS)
boot.hex: $(OBJS)
$(LK65) $(LK65_FLAGS) -hex -output $@ $(OBJS)
boot.bin: $(OBJS)
$(LK65) $(LK65_FLAGS) -bin -output $@ $(OBJS)
#===============================================================================
# Utilities
#-------------------------------------------------------------------------------
clean:
$(RM) $(OBJS)
$(RM) *.bin
$(RM) *.s19
$(RM) *.lst
$(RM) *.map
$(RM) *.coe
#===============================================================================
# Dependencies
#-------------------------------------------------------------------------------
boot.obj: \
boot.asm
boot.bin: boot.coe
bin2coe -2 bootI'm tempted to say that should be the other way around:
because makefiles take the form
Code: Select all
boot.coe: boot.bin
Code: Select all
to make something: you need this and that
mangle this and that making something
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
BigEd wrote:
I'm tempted to say that should be the other way around:
because makefiles take the form
Code: Select all
boot.coe: boot.bin
Code: Select all
to make something: you need this and that
mangle this and that making something
Putting Arlet's bin2coe.exe inside of Bitwises' 65016 Folder, with the following Makefile does indeed create an 8Kx16 "boot.coe" file necessary for generating a ROM for the ISE Core Generator. Using the "nmake" command will now make the .bin file and the .coe file as Arlet originally suggested. So anyone can check the .bin in a hex editor, and check the .coe in a text editor and compare against the original boot.asm...
Many Thanks Gentlemen!
Code: Select all
LB65_CLASS = org.x6502.x65016.Lb65016
AS65 = java -cp $(65016_JAR) $(AS65_CLASS)
LK65 = java -cp $(65016_JAR) $(LK65_CLASS)
LB65 = java -cp $(65016_JAR) $(LB65_CLASS)
RM = erase
#===============================================================================
# Rules
#-------------------------------------------------------------------------------
.asm.obj:
$(AS65) $(AS65_FLAGS) $<
#===============================================================================
# Configuration
#-------------------------------------------------------------------------------
OBJS = \
boot.obj
LK65_FLAGS = \
-bss $$00010000-$$EFFFFFFF -code $$FFFFE000-$$FFFFFFFF
#===============================================================================
# Targets
#-------------------------------------------------------------------------------
all: boot.s19 boot.hex boot.bin boot.coe
boot.s19: $(OBJS)
$(LK65) $(LK65_FLAGS) -s19 -output $@ $(OBJS)
boot.hex: $(OBJS)
$(LK65) $(LK65_FLAGS) -hex -output $@ $(OBJS)
boot.bin: $(OBJS)
$(LK65) $(LK65_FLAGS) -bin -output $@ $(OBJS)
#===============================================================================
# Utilities
#-------------------------------------------------------------------------------
clean:
$(RM) $(OBJS)
$(RM) *.bin
$(RM) *.s19
$(RM) *.lst
$(RM) *.map
$(RM) *.coe
#===============================================================================
# Dependencies
#-------------------------------------------------------------------------------
boot.obj: \
boot.asm
boot.coe: boot.bin
bin2coe -2 boot-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
- BitWise
- In Memoriam
- Posts: 996
- Joined: 02 Mar 2004
- Location: Berkshire, UK
- Contact:
ElEctric_EyE wrote:
It does work, but I have to delete all the files it makes before I run it again.
To force a rebuild you need to update the timestamp on the source file (e.g. make a simple edit and re-save - On unix there is a 'touch' command to update a file's timestamp)
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
ElEctric_EyE wrote:
It does work, but I have to delete all the files it makes before I run it again.
So, if you say that 'file.coe' depends on 'file.bin', and 'file.bin' hasn't changed, it knows that 'file.coe' is still valid, and it won't build it again.
As long as you've correctly stated all your dependencies, you don't have to delete any files to force a remake.
ElEctric_EyE wrote:
It does work, but I have to delete all the files it makes before I run it again.
-Tor
I think also you can use
or, if you're using GNU make
to ask it to do everything regardless of timestamps - in a small case like this, that's reasonable. In a bigger project, that means it's time for a cup of tea or a walk around the block.
(You wouldn't normally need to do this, if you've written your rules right, but it can be useful.)
Cheers
Ed
Code: Select all
NMAKE /A
Code: Select all
make -B
(You wouldn't normally need to do this, if you've written your rules right, but it can be useful.)
Cheers
Ed
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
Ok, I understand now. I did a couple of tests... I guess I didn't realize before running NMAKE that it would not have "gone through the paces" if the code was not modified, since I was always modifying the boot.asm and running NMAKE as a normal procedure.
It's nice to know this part of the project is all running as it should. Now I'll go back to concentrating on problems I am having elsewhere.
Trying to bring a few parts together here, but it's good to have knowledgeable help, thanks for all the input.
It's nice to know this part of the project is all running as it should. Now I'll go back to concentrating on problems I am having elsewhere.
Trying to bring a few parts together here, but it's good to have knowledgeable help, thanks for all the input.
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
I'm focusing now on a 4Kx8 bit of programming called HESMON. It has the same features as Micromon and SuperMON and after skimming through it quickly now many times, I'll feel more comfortable trying to modify it. I've run the image I have through VICE and it works.
It has a couple calls to the C64 Basic ROM. I will have to look at these first and foremost....
It has a couple calls to the C64 Basic ROM. I will have to look at these first and foremost....
A word of caution: these VIC20 and C64 monitors might make assumptions about having a certain layout of display, especially if they offer scrolling views of memory. You'll be fine if you have a layout just like a C64 of course.
(Over the weekend I had a quick look at 'sykes', an obfuscated C PET emulator for the 2005 contest. It has a small 6502 test suite, but sadly that doesn't have a readily separable I/O routine: it expects to handle a character-mapped display at $8000.)
Cheers
Ed
(Over the weekend I had a quick look at 'sykes', an obfuscated C PET emulator for the 2005 contest. It has a small 6502 test suite, but sadly that doesn't have a readily separable I/O routine: it expects to handle a character-mapped display at $8000.)
Cheers
Ed