Revision 1339
Added by markw about 4 years ago
| atari_chips/pokeyv2/convert_secure_pokeymax.cof | ||
|---|---|---|
|
<?xml version="1.0" encoding="US-ASCII" standalone="yes"?>
|
||
|
<cof>
|
||
|
<output_filename>output_files/pokeymax.pof</output_filename>
|
||
|
<n_pages>1</n_pages>
|
||
|
<width>1</width>
|
||
|
<mode>14</mode>
|
||
|
<sof_data>
|
||
|
<user_name>Page_0</user_name>
|
||
|
<page_flags>1</page_flags>
|
||
|
<bit0>
|
||
|
<sof_filename>output_files/pokeymax.sof<compress_bitstream>1</compress_bitstream></sof_filename>
|
||
|
</bit0>
|
||
|
</sof_data>
|
||
|
<version>10</version>
|
||
|
<create_cvp_file>0</create_cvp_file>
|
||
|
<create_hps_iocsr>0</create_hps_iocsr>
|
||
|
<auto_create_rpd>0</auto_create_rpd>
|
||
|
<rpd_little_endian>1</rpd_little_endian>
|
||
|
<options>
|
||
|
<map_file>1</map_file>
|
||
|
</options>
|
||
|
<MAX10_device_options>
|
||
|
<por>0</por>
|
||
|
<io_pullup>1</io_pullup>
|
||
|
<config_from_cfm0_only>0</config_from_cfm0_only>
|
||
|
<isp_source>0</isp_source>
|
||
|
<verify_protect>1</verify_protect>
|
||
|
<epof>0</epof>
|
||
|
<ufm_source>2</ufm_source>
|
||
|
<ufm_filepath>../init.hex</ufm_filepath>
|
||
|
</MAX10_device_options>
|
||
|
<advanced_options>
|
||
|
<ignore_epcs_id_check>1</ignore_epcs_id_check>
|
||
|
<ignore_condone_check>2</ignore_condone_check>
|
||
|
<plc_adjustment>0</plc_adjustment>
|
||
|
<post_chain_bitstream_pad_bytes>-1</post_chain_bitstream_pad_bytes>
|
||
|
<post_device_bitstream_pad_bytes>-1</post_device_bitstream_pad_bytes>
|
||
|
<bitslice_pre_padding>1</bitslice_pre_padding>
|
||
|
</advanced_options>
|
||
|
</cof>
|
||
| atari_chips/pokeyv2/build.sh | ||
|---|---|---|
|
my $noflash = "";
|
||
|
if (not defined $flash or $flash eq "0") {$noflash = "_noflash"};
|
||
|
|
||
|
my $sid = $variants{$variant}->{"enable_sid"};
|
||
|
if (not defined $sid) {$sid = "0"};
|
||
|
|
||
|
my $dir = "build_$variant";
|
||
|
`rm -rf $dir`;
|
||
|
mkdir $dir;
|
||
| ... | ... | |
|
}
|
||
|
|
||
|
`quartus_sh --flow compile $type > build.log 2> build.err`;
|
||
|
`quartus_cpf --convert ../convert_secure_$type.cof`;
|
||
|
`quartus_cpf --convert ../convert_secure_$type_$sid.cof`;
|
||
|
`../modifypof_$flashver $type ./output_files/$type.pof`;
|
||
|
`quartus_cpf -c -q 10MHz -g 3.3 -n p output_files/$type.pof output_files/$type.svf`;
|
||
|
`../makeflash_$flashver $type ./output_files/$type.pof $versioncode output_files/core.bin`;
|
||
| atari_chips/pokeyv2/convert_secure_pokeymax_0.cof | ||
|---|---|---|
|
<?xml version="1.0" encoding="US-ASCII" standalone="yes"?>
|
||
|
<cof>
|
||
|
<output_filename>output_files/pokeymax.pof</output_filename>
|
||
|
<n_pages>1</n_pages>
|
||
|
<width>1</width>
|
||
|
<mode>14</mode>
|
||
|
<sof_data>
|
||
|
<user_name>Page_0</user_name>
|
||
|
<page_flags>1</page_flags>
|
||
|
<bit0>
|
||
|
<sof_filename>output_files/pokeymax.sof<compress_bitstream>1</compress_bitstream></sof_filename>
|
||
|
</bit0>
|
||
|
</sof_data>
|
||
|
<version>10</version>
|
||
|
<create_cvp_file>0</create_cvp_file>
|
||
|
<create_hps_iocsr>0</create_hps_iocsr>
|
||
|
<auto_create_rpd>0</auto_create_rpd>
|
||
|
<rpd_little_endian>1</rpd_little_endian>
|
||
|
<options>
|
||
|
<map_file>1</map_file>
|
||
|
</options>
|
||
|
<MAX10_device_options>
|
||
|
<por>0</por>
|
||
|
<io_pullup>1</io_pullup>
|
||
|
<config_from_cfm0_only>0</config_from_cfm0_only>
|
||
|
<isp_source>0</isp_source>
|
||
|
<verify_protect>1</verify_protect>
|
||
|
<epof>0</epof>
|
||
|
<ufm_source>2</ufm_source>
|
||
|
<ufm_filepath>../init_0.hex</ufm_filepath>
|
||
|
</MAX10_device_options>
|
||
|
<advanced_options>
|
||
|
<ignore_epcs_id_check>1</ignore_epcs_id_check>
|
||
|
<ignore_condone_check>2</ignore_condone_check>
|
||
|
<plc_adjustment>0</plc_adjustment>
|
||
|
<post_chain_bitstream_pad_bytes>-1</post_chain_bitstream_pad_bytes>
|
||
|
<post_device_bitstream_pad_bytes>-1</post_device_bitstream_pad_bytes>
|
||
|
<bitslice_pre_padding>1</bitslice_pre_padding>
|
||
|
</advanced_options>
|
||
|
</cof>
|
||
| atari_chips/pokeyv2/convert_secure_pokeymax_1.cof | ||
|---|---|---|
|
<?xml version="1.0" encoding="US-ASCII" standalone="yes"?>
|
||
|
<cof>
|
||
|
<output_filename>output_files/pokeymax.pof</output_filename>
|
||
|
<n_pages>1</n_pages>
|
||
|
<width>1</width>
|
||
|
<mode>14</mode>
|
||
|
<sof_data>
|
||
|
<user_name>Page_0</user_name>
|
||
|
<page_flags>1</page_flags>
|
||
|
<bit0>
|
||
|
<sof_filename>output_files/pokeymax.sof<compress_bitstream>1</compress_bitstream></sof_filename>
|
||
|
</bit0>
|
||
|
</sof_data>
|
||
|
<version>10</version>
|
||
|
<create_cvp_file>0</create_cvp_file>
|
||
|
<create_hps_iocsr>0</create_hps_iocsr>
|
||
|
<auto_create_rpd>0</auto_create_rpd>
|
||
|
<rpd_little_endian>1</rpd_little_endian>
|
||
|
<options>
|
||
|
<map_file>1</map_file>
|
||
|
</options>
|
||
|
<MAX10_device_options>
|
||
|
<por>0</por>
|
||
|
<io_pullup>1</io_pullup>
|
||
|
<config_from_cfm0_only>0</config_from_cfm0_only>
|
||
|
<isp_source>0</isp_source>
|
||
|
<verify_protect>1</verify_protect>
|
||
|
<epof>0</epof>
|
||
|
<ufm_source>2</ufm_source>
|
||
|
<ufm_filepath>../init_1.hex</ufm_filepath>
|
||
|
</MAX10_device_options>
|
||
|
<advanced_options>
|
||
|
<ignore_epcs_id_check>1</ignore_epcs_id_check>
|
||
|
<ignore_condone_check>2</ignore_condone_check>
|
||
|
<plc_adjustment>0</plc_adjustment>
|
||
|
<post_chain_bitstream_pad_bytes>-1</post_chain_bitstream_pad_bytes>
|
||
|
<post_device_bitstream_pad_bytes>-1</post_device_bitstream_pad_bytes>
|
||
|
<bitslice_pre_padding>1</bitslice_pre_padding>
|
||
|
</advanced_options>
|
||
|
</cof>
|
||
| atari_chips/pokeyv2/convert_secure_sidmax_1.cof | ||
|---|---|---|
|
<?xml version="1.0" encoding="US-ASCII" standalone="yes"?>
|
||
|
<cof>
|
||
|
<output_filename>output_files/sidmax.pof</output_filename>
|
||
|
<n_pages>1</n_pages>
|
||
|
<width>1</width>
|
||
|
<mode>14</mode>
|
||
|
<sof_data>
|
||
|
<user_name>Page_0</user_name>
|
||
|
<page_flags>1</page_flags>
|
||
|
<bit0>
|
||
|
<sof_filename>output_files/sidmax.sof<compress_bitstream>1</compress_bitstream></sof_filename>
|
||
|
</bit0>
|
||
|
</sof_data>
|
||
|
<version>10</version>
|
||
|
<create_cvp_file>0</create_cvp_file>
|
||
|
<create_hps_iocsr>0</create_hps_iocsr>
|
||
|
<auto_create_rpd>0</auto_create_rpd>
|
||
|
<rpd_little_endian>1</rpd_little_endian>
|
||
|
<options>
|
||
|
<map_file>1</map_file>
|
||
|
</options>
|
||
|
<MAX10_device_options>
|
||
|
<por>0</por>
|
||
|
<io_pullup>1</io_pullup>
|
||
|
<config_from_cfm0_only>0</config_from_cfm0_only>
|
||
|
<isp_source>0</isp_source>
|
||
|
<verify_protect>1</verify_protect>
|
||
|
<epof>0</epof>
|
||
|
<ufm_source>2</ufm_source>
|
||
|
<ufm_filepath>../init_1.hex</ufm_filepath>
|
||
|
</MAX10_device_options>
|
||
|
<advanced_options>
|
||
|
<ignore_epcs_id_check>1</ignore_epcs_id_check>
|
||
|
<ignore_condone_check>2</ignore_condone_check>
|
||
|
<plc_adjustment>0</plc_adjustment>
|
||
|
<post_chain_bitstream_pad_bytes>-1</post_chain_bitstream_pad_bytes>
|
||
|
<post_device_bitstream_pad_bytes>-1</post_device_bitstream_pad_bytes>
|
||
|
<bitslice_pre_padding>1</bitslice_pre_padding>
|
||
|
</advanced_options>
|
||
|
</cof>
|
||
| atari_chips/pokeyv2/init.c | ||
|---|---|---|
|
buffer[0] |= (irq_en&1)<<3;
|
||
|
buffer[0] |= (detect_right&1)<<4;
|
||
|
buffer[0] |= (pal&1)<<5;
|
||
|
int post_divide = 0b10100101;
|
||
|
int post_divide = 0b10100000;
|
||
|
buffer[1] |= (post_divide&0xff)<<0;
|
||
|
int gtia_enable = 0b1100;
|
||
|
buffer[2] |= (gtia_enable&0xf)<<0;
|
||
| ... | ... | |
|
}
|
||
|
fclose(f);
|
||
|
|
||
|
FILE * x =fopen("init.bin","w");
|
||
|
FILE * x =fopen("init_0.bin","w");
|
||
|
fwrite(&buffer[0],1,32768,x);
|
||
|
fclose(x);
|
||
|
|
||
|
post_divide = 0b10100101;
|
||
|
buffer[1] |= (post_divide&0xff)<<0;
|
||
|
|
||
|
x =fopen("init_1.bin","w");
|
||
|
fwrite(&buffer[0],1,32768,x);
|
||
|
fclose(x);
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
| atari_chips/pokeyv2/makehexfiles | ||
|---|---|---|
|
rm -f init.bin
|
||
|
gcc -Wall init.c -lm -o init && ./init
|
||
|
./makehex ./init.bin init.hex "0x000000"
|
||
|
./makehex ./init_0.bin init_0.hex "0x000000"
|
||
|
./makehex ./init_1.bin init_1.hex "0x000000"
|
||
|
|
||
|
rm -f sidwavedata.bin
|
||
|
gcc -Wall sidwavedata.c -lm -o sidwavedata && ./sidwavedata
|
||
Allow different settings for with and without sid (for post divide!)